Variables & Constants
Data Types & Naming Rules
Operators & Order of Operations
Expressions & IPO
If Statements & Conditions
100

A name used to store data that can change during the program.

Variable

100

Name three basic data types in Python.

int, float, str

100

What does the + operator do?

Adds two values.

100

What does IPO stand for in programming?

Input, Process, Output

100

What keyword starts a decision in Python?

if

200

How do you assign the value 10 to a variable called x?

x = 10

200

What data type is the result of 5.0 + 2?

float

200

What is the result of 3 + 4 * 2?

11 (multiplication before addition)

200

What Python function is commonly used for input?

input()

200

What will this print? if 3 > 2: print("Yes")

Yes

300

What keyword is commonly used to define a constant in Python, even though Python doesn't enforce it?

Constants are written in all caps, e.g., PI = 3.14.

300

Is my-variable a valid variable name in Python?

No, hyphens/dash are not allowed. Use underscores instead.

300

What is the result of 10 // 3?

3 (floor division)

300

What is the output of: print(5 * 2 + 1)?

11

300

What is the role of else in an if statement?

Runs code if the condition is false.

400

Is the following valid? 3x = 5 Why or why not?

No, variable names cannot start with a number.

400

Name two Python naming conventions for variables.

Use lowercase letters, use underscores for readability (snake_case).

400

What does % operator do in Python?

Returns the remainder of a division.

400

Identify the process in this code:


total = price * quantity

price * quantity is the process (calculation).

400

What is the difference between = and == in an if statement?

= is for assignment, == is for comparison (equality check).

500

Explain the difference between a variable and a constant.

A variable can change during execution; a constant should remain unchanged throughout the program.

500

What is this case called? variableOne

camelCase

500

Evaluate: (5 + 3) * 2 ** 2

32

500

Write a Python expression to read/enter a name and print a welcome message.

name = input("Enter name: ")
 print("Welcome, " + name)

500

What will be printed? x = 5; if x > 10: print("High"); else: print("Low")

Low

M
e
n
u