Pythonrevision
Pythonrevision
16. Which of the following is the correct order of precedence for arithmetic
operators?
a) +, -, *, /
b) *, /, +, -
c) +, *, -, /
d) -, +, /, *
17. What is the result of a = 2; b = 3; a *= b;?
a) 2
b) 3
c) 5
d) 6
23. Which operator is used to check if two values are not equal?
a) !=
b) ==
c) >=
d) <=
29. What will be the value of x after the following code: x = 5; x %= 3;?
a) 2
b) 5
c) 3
d) 1
a) .pyth
b) .py
c) .pt
d) .txt
a) 2variable
b) variable@name
c) variable_name
d) variable-name
a) def
b) function
c) func
d) define
for i in range(3) :
print (i)
a) 1 2 3
b) 0123
c) 0 1 2 3
d) 3 2 1