Python Basics
Data Types & Variables
Control Flow
Functions & Input/Output
Lists & Records
100

What symbol is used to make a comment in Python?

#

100

What data type is used to store whole numbers?

int

100

What keyword is used to make a decision in Python?

if

100

What keyword is used to define a function in Python?

def

100

What data type is used to store a collection of items in order?

list

200

What function is used to display text on the screen?

print()

200

What keyword is used to assign a value to a variable?

No keyword—use =

200

What keyword allows you to run code repeatedly while a condition is true?

while

200

What function do you use to get input from a user?

input()

200

How do you access the first item in a list called fruits?

fruits[0]

300

What is the extension used for Python files?

.py

300

What function can you use to check the type of a variable?

type()

300

What is the keyword used to skip the rest of the loop and start the next iteration?

continue

300

What do we call a value we pass into a function?

Argument

300

What function adds an item to the end of a list?

append()

400

What is the name of the error you get when your code doesn't follow Python's rules?

SyntaxError

400

What data type is "True"? (with quotes)

str

400

What is the result of this condition: 5 > 10?

False

400

What does return do in a function?

Sends a result back to the caller

400

What Python data type is used to store key-value pairs?

dictionary

500

What is the name of the environment that runs Python code interactively, line by line?

DAILY DOUBLE!!!

Interpreter

500

What will be the result of this expression: 3 + 4.5?

7.5

500

What is printed by this code: for i in range(2): print(i)?

0 and 1

500

What is printed by this function call: print(greet("Alice")), if def greet(name): return "Hi " + name?

Hi Alice

500

What is printed: student = {"name": "Mia", "grade": 90}
print(student["name"])?

DAILY DOUBLE!!!

Mia

M
e
n
u