SLSkillLoop
Python practice

Python Variables Practice

Variables are one of the first Python skills worth practicing until they feel automatic. Use these short questions to review assignment, names, values, and simple updates.

Example practice questions

Try these samples, then continue into the Python Practice Labfor guided browser-based practice.

1

Which line stores the number 12 in a variable named count?

Answer: count = 12

2

After score = 4 and score = score + 1, what is score?

Answer: 5

3

Which variable name is valid in Python: user-name or user_name?

Answer: user_name

4

What type of value is stored by name = 'Ava'?

Answer: A string

5

What does total += 3 do?

Answer: It adds 3 to total and stores the new value.