Introduction to Python MCQ
Introduction to Python MCQ
a) abc = 1,000,000
b) a b c = 1000 2000 3000
c) a,b,c = 1000, 2000, 3000
d) a_b_c = 1,000,000
b) a b c = 1000 2000 3000
6. Given a function that does not return any value, What value is thrown by default when executed in
shell.
a) int
b) bool
c) void
d) None
d) None
12. Which of the following is the correct extension of the Python file?
a) .python
b) .pl
c) .py
d) .p
c) .py
14. Which of the following is used to define a block of code in Python language?
a) Indentation
b) Key
c) Brackets
d) All of the mentioned
a) Indentation
15. Which of the following is the use of id() function in python?
a) Every object doesn’t have a unique id
b) Id returns the identity of the object
c) All of the mentioned
d) None of the mentioned
b) Id returns the identity of the object
23.What will be the output of the following Python code snippet? bool(‘False’) bool()
(a) True True
(b) False True
(c) False False
(d) True False
(d) True False