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 taken181
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?
RuntimeError
NameError
DataError
KeyError
2. Which of these is not a well-known Python web framework?
Django
Python.NET
Zope
Pylons
3. What was the original working name of Python 3?
Python++
Python 3000
Python#
Python 2.9
4. Which of these function parameter types is mutable?
str
list
bool
int
5. What's the correct form of the decorator for a class method?
@class-method
@ClassMethod
@class_method
@classmethod
6. What will be the result of running this code? `{}.get("x")`
KeyError
x
{"x"}
None
7. What's the result of this code? `set(1, 1, 2, 2, 3)`
{1: 2, 2: 2, 3: 1}
{1, 2, 3}
[1, 2, 3]
TypeError
8. In the Python interpreter, how do you get a list of all the local variables?
dir()
vars()
__all__()
help()
9. Which of these is not a method of `int` objects?
to_bytes
conjugate
hex
numerator
10. What does `functools.partial` do?
Calls `next()` on a generator without yielding a value
Returns a partially-applied version of the supplied function
Creates a fractions.Fraction 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!
Click each country or territory on the map of the Lesser Antilles.
Fill in the map by guessing languages. When you guess a language, all the countries that use it as an official language will be filled in.
Can you spell out the name of the European capital by guessing letters? Watch yourself! After 3 incorrect guesses, you're fully on the "gallows"!
Comments
No comments yet