Python Data Types Quiz
- Questions: 15
- Easy
- Pass mark: 70%
Every value in Python has a type, and the type decides what you can do with it. This free quiz has 15 short questions for beginners on the built-in data types: numbers, text, True and False, None, and the four collections you will use all the time.
What the quiz covers
- Numbers:
intandfloat, mixing them and why0.1 + 0.2is not exactly 0.3 - Text (
str), booleans (bool) andNone - Checking a type with
type()andisinstance() - Collections:
list,tuple,dictandset, and when to use which - Mutable and immutable types, and what can be a dictionary key
How it works
- 15 questions: 11 with one correct answer, 4 where you select every correct answer
- After each question you see the correct answer and a short explanation
- No time limit and no account needed
- Score 70% or more (11 of 15) to pass
Each type has a runnable example: basic data types, lists, tuples, dictionaries and sets. After this one, try the Python Variables Quiz or the Python Basics Quiz.