Year 7 · Computing · Python: first programs · Lesson 3
Numbers and calculations
Python data types (string, integer, float), converting input with int() and float(), and arithmetic operators including // and %.

17-minute video lesson
Teaching, worked examples and 20 practice questions solved step by step.
Watch free for a monthWhat your child will learn
- Name Python data types
- Convert input to numbers
- Use arithmetic operators
- Debug type errors
The method
- String.
- int / float.
- Operators.
- print.
Key words: data type, integer, float, string, int(), operator.
Worked examples
The first three practice questions from the lesson, with every step.
Question 1
What data type does input() give?
- Step 1: Text
Answer: string
Question 2
What does int() do?
- Step 1: Whole
Answer: converts to a whole number (integer)
Question 3
What does float() do?
- Step 1: Decimal
Answer: converts to a decimal number