PYTHON 3.10+ · 15 QUESTIONS · ABOUT 10 MINUTES

Read the code. Predict what Python does.

Fifteen short snippets, from float maths to shared class attributes. Each answer comes with the rule behind it, and your result is broken down by topic. No sign-up, nothing saved.

Start the Python test
>>> 0.1 + 0.2 == 0.3False>>> 7 // -2-4>>> bool("False")True>>> [1, 2].sort()(nothing: it returns None)
QUESTION 1 / 15 · TYPES & VALUESEasy

What does this print?

print(0.1 + 0.2 == 0.3)

What this Python test measures, in short

This test checks whether you can predict what real Python code does: how values, names, collections, functions and objects behave at run time. It rewards knowing the language's rules over remembering library names.

Every snippet runs as shown on Python 3.10 or later. The questions are our own and are not standardised against a population, so treat the result as a check on your knowledge, not a certification.

By What's Your IQ · Reviewed 4 Oct 2026
Format
15 predict-the-output questions, 4 options each
Topics
Types, collections, functions and scope, flow and comprehensions, objects and iterators
Version
Python 3.10+ (Python 2 reached end of life on 1 Jan 2020)
Language
Created by Guido van Rossum; first public release February 1991
THE IDEA BEHIND A THIRD OF THE QUESTIONS

Variables are labels, not boxes

In Python, b = a doesn't copy anything. It puts a second label on the same object. Step through the five lines and watch which object each name points to.

NAMES
a→ #1
OBJECTS IN MEMORY
#1 · list · named a[1, 2]
One list object (#1) is created and the name a is attached to it.
WHAT "PYTHONIC" MEANS

Same result, written the way Python intends

WORKS, BUT FIGHTS THE LANGUAGE
names = ["Ada", "Alan", "Grace"]for i in range(len(names)): print(i, names[i])
PYTHONIC
names = ["Ada", "Alan", "Grace"]for i, name in enumerate(names): print(i, name)

enumerate hands you the index and the item together, so there's no indexing to get wrong and the loop works on any iterable, not just lists.

2024Python became the most-used language on GitHubIt overtook JavaScript in GitHub's Octoverse report, driven largely by data science and machine-learning work.1
1991First release. Guido van Rossum published Python 0.9.0, naming it after Monty Python's Flying Circus rather than the snake.2
2008 → 2020The long switch. Python 3.0 broke compatibility on purpose (print became a function, text became Unicode). Python 2 was finally retired on 1 January 2020.3
Since Oct 2021Top of TIOBE. Python has held first place in the TIOBE popularity index, which counts search-engine results for each language.4
2024 surveyAbout half of developers. Roughly 51% of respondents to Stack Overflow's survey had used Python in the past year, second only to JavaScript.5
  1. GitHub. (2024). Octoverse 2024: AI leads Python to top language as the number of global developers surges.
  2. Python Software Foundation. History and License. Python documentation.
  3. Python Software Foundation. (2020). Sunsetting Python 2.
  4. TIOBE Software. TIOBE Programming Community Index.
  5. Stack Overflow. (2024). 2024 Developer Survey: Technology.

Where to go next

Knowing Python is one thing. How do you reason?

Our full IQ test measures the pattern-finding and working memory that make debugging easier: 60 questions across four domains, about 30 minutes.

Take the full IQ test