Python course with 57 real-time projects - Learn Python
This Python quiz includes the basic and some intermediate level questions which will help you to memorize your concepts.
So, are you ready to attempt this quiz?
Also, do not forget to check other parts of the Python quiz as well.
- Python Quiz – 1
- Python Quiz – 2
- Python Quiz – 3
All the Best!!!
Quiz Summary
0 of 15 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 15 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
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
-
Question 1 of 15
1. Question
How many CPUs will the threading library use?
CorrectIncorrect -
Question 2 of 15
2. Question
Which of the following codes raises an exception?
CorrectIncorrect -
Question 3 of 15
3. Question
Which of the following follow PEP8?
Please select 2 correct answersCorrectIncorrect -
Question 4 of 15
4. Question
What will this code print?
>>> a=7
>>> print(a+1)CorrectIncorrect -
Question 5 of 15
5. Question
What is the maximum value for an integer in Python 3?
CorrectIncorrect -
Question 6 of 15
6. Question
How do you denote the end of a block in Python 3?
CorrectIncorrect -
Question 7 of 15
7. Question
Which of these if-statements work?
Please select 2 correct answersCorrectIncorrect -
Question 8 of 15
8. Question
In this list, how will you access the letter ‘t’ in ‘bat’?
list = [1, [‘a’, ‘b’, [‘kill’, ‘bat’, ‘cup’], ‘c’], 3]CorrectIncorrect -
Question 9 of 15
9. Question
How will you turn the list a = [1, 2, 7, 8] into [1, 2, 3, 4, 5, 6, 7, 8]?
Please select 2 correct answersCorrectIncorrect -
Question 10 of 15
10. Question
What is the value of y?
>>> x, y, z = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)[2::3]CorrectIncorrect -
Question 11 of 15
11. Question
What is the result of {1, 2, 3} & {4, 5, 6}?
CorrectIncorrect -
Question 12 of 15
12. Question
Which statements delete the value ‘milk’ from the set s = {‘milk’, ‘cheese’, ‘butter’, ‘buttermilk’}?
Please select 4 correct answersCorrectIncorrect -
Question 13 of 15
13. Question
In the following code, how many objects and references does Python create?
name = ‘Ayushi’
fname = nameCorrectIncorrect -
Question 14 of 15
14. Question
According to PEP 8, what case should you use for variable names with more than one word?
CorrectIncorrect -
Question 15 of 15
15. Question
What is the output of the following code?
>>> nums = [[val for val in range(num)] for num in range(3)]
>>> for num in nums:
for val in num:
if val < 2:
print(‘*’, end=”)CorrectIncorrect
This was all in the Python quiz. Hope you enjoyed answering it.
Do share your experience and score of the Python quiz in the comment section.