Objective Question of Python
1. How many built-in functions in python 3.9.1?
a. 40
b. 69
c. 39
d. 26
Answer- ?
2. What is the module name which contains a function factorial()?
a. System
b. Math
c. Platform
d. internet
Answer - ?
3. Which module contains system() function?
a. System
b. Window
c. platform
d. math
Answer- ?
4. What is the default value of the“end” keyword?
a. \n
b. \a
c. \t
d. \t
Answer- ?
5. How to prevent newline from a print() function by using____?
a. Formal argument
b. Keyword argument
c. actual argument
d. default argument
Answer- ?
6. What is the output of this statement?
print(“hello user”, end=”\b”)
print(“Python Rocks”)
a. hello user Python Rocks
b. hello user
c. hello usePython Rocks
d. Python Rocks hello user
Answer - ?
7. All keywords in Python are in _________?
a. lower case
b. UPPER CASE
c. Capitalize
d. None of the mentioned
Answer- ?
8. Which of the following are invalid variables?
a. my string
b. foo
c. 1st _string
d. __ty__
Answer- ?
9. Which of the following is invalid?
a. _a=10
b. __str__=10
c. __a=10
d. None of the above
Answer- ?
10. Is Python case sensitive when dealing with identifiers?
a. Yes
b. Machine dependant
c. NO
d. None of the above
Answer- ?
11. What are the possible length identifiers?
a. 20
b. 40
c. 40
d. None of the above
Answer- ?
12. How many reserved words are there in Python?
a. 40
b. 36
c. 35
d. 25
Answer- ?
13. Are Python support switch and do-while statements?
a. Yes
b. Only switch
c. No
d. The only d -while
Answer- ?
14. Which of the following is not a keyword?
a. eval
b. nonlocal
c. assert
d. pass
Answer- ?
15. What is the output of this statement 10/0?
a. ZeroDivisionError
b. Syntax error
c. 0
d. None of the above
Answer- ?
16. Which of the following cannot be variable?
a. __init__
b. It
c. in
d. on
Answer- ?
17. Which of the following a keyword in Python?
a. False
b. Del
c. true
d. none
Answer-?
18. How many data types in Python?
a. 13
b. 15
c. 14
d. 16
Answer- ?
19. How many numeric types in Python?
a. 5
b. 3
c. 6
d. 7
Answer- ?
20. How many sequence types in Python?
a. 6
b. 8
c. 7
d. 9
Answer- (a)