Python quiz Questions Part-2
FREE Online Courses: Dive into Knowledge for Free. Learn More!
Quiz Summary
0 of 30 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 30 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
-
Question 1 of 30
1. Question
- Which of the following is true about the frozen set compared to the set?
CorrectIncorrect -
Question 2 of 30
2. Question
Which of the following is not a boolean value?
CorrectIncorrect -
Question 3 of 30
3. Question
-
- What is the default step value of the function range()?
CorrectIncorrect -
-
Question 4 of 30
4. Question
- What is the default data type of the return value of a function?
CorrectIncorrect -
Question 5 of 30
5. Question
- Which of the following is not a built-in function in Python?
CorrectIncorrect -
Question 6 of 30
6. Question
- The maximum number of arguments that can be given to the zip() function is?
CorrectIncorrect -
Question 7 of 30
7. Question
- Which one of eval() and exec() can take ‘a=5\nprint(“a:”,a)’ as an argument and give the appropriate result?
CorrectIncorrect -
Question 8 of 30
8. Question
- What of the following is a correct match for the argument type and the syntax?
CorrectIncorrect -
Question 9 of 30
9. Question
- Which of the following is the advantage of recursion?
CorrectIncorrect -
Question 10 of 30
10. Question
- Which of the following is the module used for sending mail in Python?
CorrectIncorrect -
Question 11 of 30
11. Question
- What is the output of the below code?
set1={1,2.3,’a’}
set2={‘h’,1.0,3,’a’}
set1.symmetric_difference(set2)
CorrectIncorrect -
Question 12 of 30
12. Question
- Find the output of the below code?
‘PythonGeeks'[False*True+True]
CorrectIncorrect -
Question 13 of 30
13. Question
- What is the output of the below code?
if(): print(“if”)
else: print(“else”)
CorrectIncorrect -
Question 14 of 30
14. Question
- How many times does the below loop iterate?
a=15
while(a>0):
if(a%2):
a=a-1
else:
a=a-3
CorrectIncorrect -
Question 15 of 30
15. Question
- What is the output of the below code?
seq=[1,2,3,4,5]
seq.clear()
seq
CorrectIncorrect -
Question 16 of 30
16. Question
- Find the output of the below code?
s=’PythonGeeks’
p=s[0], s[-1], s[-1:-2]
‘{0}-{1}-{2}’.format(*p)
CorrectIncorrect -
Question 17 of 30
17. Question
- What is the output of the below code?
if({2,2,3}>{2,1,3}):
if(True and False or False):
print(“1”)
elif(”):
print(‘2’)
else:
print(‘3’)
CorrectIncorrect -
Question 18 of 30
18. Question
- Which of the following gives the output as False?
CorrectIncorrect -
Question 19 of 30
19. Question
- Find the output of the below code.
set(range(-1,-5,-2))
CorrectIncorrect -
Question 20 of 30
20. Question
- Which of the following is the correct code to create a circle of radius 50 on GUI?
CorrectIncorrect -
Question 21 of 30
21. Question
- What is the output of the below code?
from itertools import zip_longest
for i in zip_longest({1.2,3.5,6.7},[‘a’,’b’,’c’],range(4)):
print(i,end=(‘ ‘))
CorrectIncorrect -
Question 22 of 30
22. Question
- What is the output of the code?
def func(x,y,z):
print(x*y-z)
func(x=2,z=3,y=1)
CorrectIncorrect -
Question 23 of 30
23. Question
- Which of the following calls give an error for the below function?
def func(a,b,*c):
print(a,b,c)
CorrectIncorrect -
Question 24 of 30
24. Question
- Find the output of the below code.
from math import *
a=16
print(eval(‘sqrt(n)’,{},))
CorrectIncorrect -
Question 25 of 30
25. Question
- What is the output of the below code?
exec(‘a=10\nif(n%3):print(a*3)\nelse:print(a*20)’)
CorrectIncorrect -
Question 26 of 30
26. Question
- Which of the following is the correct way to display text ‘PythonGeeks’ on the GUI?
CorrectIncorrect -
Question 27 of 30
27. Question
- Find the output of the below code.
ord(‘D’)-ord(‘A’)
CorrectIncorrect -
Question 28 of 30
28. Question
- What does the below function return?
def fun(s):
if(len(s)==1):
return s[0]
return fun(s[:-1])+s[-1]
CorrectIncorrect -
Question 29 of 30
29. Question
Which of the following is the correct way to get the root using the parser ’parser’. In XML processing?
CorrectIncorrect -
Question 30 of 30
30. Question
- What is the command used to remove the lock constraint in multiprocessing?
CorrectIncorrect