TechantCode
Home
(current)
Python Quiz
Mar 24, 2021
Q11. In Python 3 , the maximum value for an integer is 2
63
-1.
a) False
b) True
Answers
a) False
Mar 24, 2021
Q12. If List = [1,2,3,4,5] and we write List[3]=List[2], then what will be List[3]
a) 1
b) 3
c) 2
Answers
b) 3
Mar 24, 2021
Q13. Identify the right way to close a file.
a) File.close()
b) close(File)
c) close("File")
Answers
a) File.close()
Mar 24, 2021
Q14. If List = min([sum([10,20]),
max([abs(-30),4)]), then List = __
a) 10
b) 30
c) 20
Answers
b) 30
Mar 24, 2021
Q15. Which method lets a class act like a function?
a) __init__()
b) __del__()
c) __call__()
Answers
c)__call__()
Mar 24, 2021
Q16. PyPI stands for __
a) Python Project Index
b) Python Package Index
c) Python Package Installer
Answers
b) Python Package Index
Mar 24, 2021
Q17. Which slice operation will reverse the list?
a) Lists[-1: :]
b) number[ : :-1]
c) numbers[ :-1: ]
Answers
b) number[ : :-1]
1
2