Python programming — Expert level

Python is easy, they say. How well do you know it?
Quiz by
paulbx
Rate:
Last updated: February 8, 2025
You have not attempted this quiz yet.
First submittedFebruary 8, 2025
Times taken175
Average score40.0%
Report this quizReport
4:00
The quiz is paused. You have remaining.
Scoring
You scored / = %
This beats or equals % of test takers also scored 100%
The average score is
Your high score is
Your fastest time is
Keep scrolling down for answers and more stats ...
1. Which of these is not a built-in exception?
NameError
KeyError
DataError
RuntimeError
2. Which of these is not a well-known Python web framework?
Python.NET
Django
Pylons
Zope
3. What was the original working name of Python 3?
Python++
Python#
Python 2.9
Python 3000
4. Which of these function parameter types is mutable?
bool
str
list
int
5. What's the correct form of the decorator for a class method?
@classmethod
@class_method
@class-method
@ClassMethod
6. What will be the result of running this code? `{}.get("x")`
{"x"}
None
KeyError
x
7. What's the result of this code? `set(1, 1, 2, 2, 3)`
TypeError
{1: 2, 2: 2, 3: 1}
[1, 2, 3]
{1, 2, 3}
8. In the Python interpreter, how do you get a list of all the local variables?
vars()
help()
dir()
__all__()
9. Which of these is not a method of `int` objects?
to_bytes
conjugate
numerator
hex
10. What does `functools.partial` do?
Returns a partially-applied version of the supplied function
Creates a fractions.Fraction value
Calls `next()` on a generator without yielding a value
Returns part of an iterable
Save Your Stats
Your Next Quiz
How many countries do you know? In this quiz, you've got 15:00 to name as many as you can. Go!
Can you name the capitals cities of all 196 countries in the world?
Ten random pairs of countries have been merged on the world map. Can you find them?
Can you place these colors on the grid? Good luck!
Comments
No comments yet