Public Deck Preview

Python Fundamentals

Study the deck, open a game mode, or copy it into your own collection.

Cards

1. How do you start a single-line comment in Python?
#
hash sign
2. What built-in function displays output?
print()
print
3. What built-in function reads a line of user input?
input()
input
4. Which keyword defines a function?
def
5. Which keyword begins a conditional branch?
if
6. Which loop iterates over items in an iterable?
for loop
for
7. Which loop repeats while a condition is true?
while loop
while
8. What Python type stores an ordered, mutable sequence?
list
9. What Python type stores an ordered, immutable sequence?
tuple
10. What Python type maps unique keys to values?
dict
dictionary
11. What Python type stores unique elements?
set
12. What are Python's two Boolean values?
True and False
13. What does len() return?
The number of items in an object
14. What does import do?
Makes a module's code or names available
15. How does Python mark a block of code?
Indentation