Automation Objective
Assessment 2026/2027 – Actual
Exam Q&As (100% Verified,
Detailed Rationales, Pass
Guaranteed, A+ Graded
Question 1
Which Python data type is used to store a sequence of items that
can be modified?
A. Tuple
B. String
C. List
D. Integer
Answer: C. List
Rationale: Lists are mutable data structures in Python, meaning
items can be added, removed, or changed after creation. Tuples
are immutable, while strings store text and integers store whole
numbers.
,Question 2
Which statement correctly creates a Python dictionary?
A. employee = ("John", 35)
B. employee = {"name":"John","age":35}
C. employee = ["John",35]
D. employee = {John,35}
Answer: B. employee = {"name":"John","age":35}
Rationale: Dictionaries store key-value pairs using curly braces.
Each key is associated with a specific value, allowing efficient
data retrieval.
Question 3
What is the output of the following code?
x = 5
y = 2
print(x // y)
A. 2.5
B. 3
C. 2
,D. 2.0
Answer: C. 2
Rationale: The floor division operator (//) returns the integer
quotient after removing the decimal portion. Therefore, 5 // 2
equals 2.
Question 4
Which loop is best used when the number of iterations is
known?
A. While loop
B. For loop
C. Infinite loop
D. Nested loop
Answer: B. For loop
Rationale: A for loop is typically used when iterating over a
sequence or when the number of repetitions is predetermined.
Question 5
What is the purpose of a Python function?
A. To store files
, B. To create variables
C. To organize reusable blocks of code
D. To install packages
Answer: C. To organize reusable blocks of code
Rationale: Functions allow developers to encapsulate logic into
reusable components, improving readability and reducing
duplication.
Question 6
Which keyword is used to define a function in Python?
A. function
B. define
C. func
D. def
Answer: D. def
Rationale: Python uses the keyword "def" to create functions. It
signals the beginning of a function definition.
Question 7
What will the following code display?