Olete.in
Articles
Mock Tests
🧪 Python MCQ Quiz Hub
Python MCQS - Operators
Choose a topic to test your knowledge and improve your Python skills
1. print(4**2) will show ?
12
16
8
Error
2. What is the use of the ** operator ?
Multiplication
Sqaure
Double multiple
Power
3. print(4//2) will show ?
4
1
2
3
4. print(4++2) will show
6
4
2
Error
5. print(3--5) will give
5
3
8
Error
6. What is the use of the % operator ?
To find the division
To find the remainder
To find the power
Nothing
7. What will be output of the following program ? print(3%4)
3
4
1
Error
8. What will it show ?, print(64%2)
32
0
1
2
9. What will the output of the following program, print(//)
0
1
2
Error
10. From which of the following? , the output will be 32
print(64//2)
print(65//2)
Both of the above
print(66//2)
11. print(9//2)
4
5
4.5
None of the above
12. print(4<<2)
2
3
4
16
13. print(2<<1)
1
2
3
4
14. print(2>>3)
1
2
0
3
15. print(100>>4)
100
6
4
8
16. << operator is replace by
lshift()
more()
ls()
rs()
17. >> operator is replace by
rshift()
more()
ls()
rs()
18. or() is replaced by which of the following operator ?
&
%
|
/
19. Which type of behavior is shown by the | operator ?
and
or
division
power
20. AND is shown by which of the operator ?
|
%
/
None of the above
21. & operator is show the
and
or
mode
binary
22. Which of the following is not valid operator in the python
&
|
++
**
23. Which of the following operator is valid in the python ?
**
&
|
All of the above
24. print(4*5)
0
2
1
None of the above
25. print(100 & 4)
100
4
1
Error
26. print(100|4)
100
4
0
1
27. print(50&4)
50
4
1
0
28. print(50&&4)
50
4
0
Error
29. print(1000||300)
1000
300
0
Error
30. print(1000&300)
1000
300
296
1
31. print(1000|300)
1000
1004
300
296
32. print(1000|300&234)
1000
300
234
False
33. print(1000|300|234)
1000
1004
1006
1008
34. print(1000&300&234)
1000
401
40
4
35. print(121--1000&300&234%23++1//4)
1
0
1000
Error
36. print(121--1000&300&234++1//4)
1
0
32
23
37. Which of the following is not correct ?
a=a+1
a+=1
a=+1
a++
38. Which type of operator is not supported in the python programming language ?
a++
a--
++a
All of the above
39. print(1000<300)
1000
3000
300
None of the above
40. print(1000>300)
1000
300
True
false
41. print(1000==300)
True
False
Error
None of the above
42. print(10=10)
True
False
Error
None of the above
43. print(10>10<20==9)
True
False
Error
None of the above
44. Which of the following line gives a true output ?
print(10>9)
print(20=20)
print(3<2)
1 and 2
45. print(10<50 & 300)
True
False
Error
None of the above
46. print(print(45+3))
48
None
48 none
Error
47. print(print(45&34))
45
34
45 None
32 None
48. print(print(print(print(print(45))))), How many time it will print the None in output ?
0
1
3
4
49. print(45%4)
0
1
2
3
50. print(237//7)
32
33
43
12
Submit