1. What will be the output of this code?
print(3 + 4 * 2)
A) 14 B) 11 C) 10 D) 7
2. Which of the following is a correct variable name in Python?
A) 2value B) value_2 C) value-2 D) value 2
3. What is the correct file extension for Python files?
A) .pyth B) .pt C) .python D) .py
4. What will this code print?
print(type("Hello"))
A) <class 'string'> B) <class 'char'> C) <class 'str'> D) <string>
5. What is the output of this code?
x = 10
x += 5
print(x)
A) 5 B) 10 C) 15 D) 20
6. Which of these is a correct if statement?
A) if x == 5 then: B) if (x == 5) C) if x = 5: D) if x == 5:
7. What does the len() function do in Python?
A) Adds numbers B) Returns the size of a file C) Returns the length of an object D) Converts
strings to integers
8. What will be the result of 5 // 2 in Python?
A) 2.5 B) 3 C) 2 D) 2.0
9. Which of the following is used to create a comment in Python?
A) // comment B) <!-- comment --> C) # comment D) /* comment */
10. Which data type is mutable in Python?
A) str B) int C) tuple D) list