Automation Final Exam | Actual
Verified Exam | Complete
Questions and Verified Solutions |
Latest 2026/2027 Update
Python Fundamentals and Syntax
Description: These questions cover Python basics including variables, data types,
operators, and basic syntax rules essential for IT automation.
Keywords: variables, data types, operators, syntax, print, input, type conversion
Q1. What is the correct way to declare a variable in Python?
A) var x = 10
B) x = 10 ✅
C) int x = 10
D) declare x = 10
,Q2. Which data type is used to store True or False values?
A) int
B) str
C) bool ✅
D) float
Q3. What is the output of print(type(3.14))?
A) <class 'int'>
B) <class 'float'> ✅
C) <class 'str'>
D) <class 'double'>
Q4. Which operator is used for exponentiation in Python?
A) ^
B) ** ✅
C) *
D) //
Q5. What does // operator do in Python?
,A) Division
B) Floor division ✅
C) Modulus
D) Exponentiation
Q6. Which of the following is an immutable data type in Python?
A) list
B) dict
C) tuple ✅
D) set
Q7. What is the correct file extension for Python files?
A) .pyt
B) .pt
C) .py ✅
D) .python
Q8. How do you create a single-line comment in Python?
A) // comment
B) /* comment */
C) # comment ✅
D) -- comment
, Q9. What is the output of print(10 % 3)?
A) 3
B) 1 ✅
C) 0
D) 3.33
Q10. Which function is used to get user input in Python?
A) get()
B) input() ✅
C) read()
D) scan()
Strings and String Manipulation
Description: These questions test knowledge of string operations, methods, formatting,
and slicing used in automation scripts.
Keywords: string methods, slicing, formatting, concatenation, f-strings
Q11. What is the output of print("Hello" + " " + "World")?