Python Mcqs
Python Mcqs
16 Which one of the following is a valid Python if statement : if a>=2 : if (a >= 22)
256 128
19 What is the value of the expression 2**2**3**1?
Which of the following words cannot be a variable in
20 _val val
python language?
Division, Power, Division and
Multiplication, Multiplication
Addition and
21 Which one of the following has the same precedence level?
Subtraction
Which of the follwing are the keys in the given statement : 10, 20 first, second
28
abc = {"first":10, "second":20}
[1,1,2,3,4,2,3,4] {1,2,3,4}
29 What is the output of following: set([1,1,2,3,4,2,3,4])
Which of the following function is used to know the data datatype() typeof()
30
type of a variable in Python?
What will be the output of the following Python code? for i Hello HelloHello
31
in range(0,2,2): print("Hello")
When break statement When loop
32 When does the else statement written after loop executes? is executed in the loop condition becomes
false
{} set() Answer4
if a == b: if a != b: Answer3
64 12 Answer1
try _try Answer3