thumbnail

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?
KeyError
RuntimeError
DataError
NameError
2. Which of these is not a well-known Python web framework?
Django
Python.NET
Pylons
Zope
3. What was the original working name of Python 3?
Python++
Python 2.9
Python 3000
Python#
4. Which of these function parameter types is mutable?
list
bool
int
str
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")`
x
{"x"}
KeyError
None
7. What's the result of this code? `set(1, 1, 2, 2, 3)`
{1, 2, 3}
{1: 2, 2: 2, 3: 1}
TypeError
[1, 2, 3]
8. In the Python interpreter, how do you get a list of all the local variables?
help()
dir()
vars()
__all__()
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 part of an iterable
Creates a fractions.Fraction value
Returns a partially-applied version of the supplied function
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.
Italy has declared war 18 times on 16 unique countries. What were the countries?
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