Year 7 · Computing · Python: first programs · Lesson 2
Variables and input
Python variables and assignment, getting user input with input(), changing a variable's value, and the rules for naming variables.

17-minute video lesson
Teaching, worked examples and 20 practice questions solved step by step.
Watch free for a monthWhat your child will learn
- Create and use variables
- Get user input
- Predict output with variables
- Choose valid, meaningful names
The method
- Name.
- Store.
- Use (no quotes).
- Check case.
Key words: variable, assignment, input, prompt, value, case-sensitive.
Worked examples
The first three practice questions from the lesson, with every step.
Question 1
What is a variable?
- Step 1: Box
Answer: a named place that stores data
Question 2
What does = do in Python?
- Step 1: Store
Answer: assigns (stores) a value in a variable
Question 3
What does input() do?
- Step 1: Ask
Answer: asks the user to type something