Skip to content
Menu

Year 7 (ages 11–12, Grade 6 in the US) · 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 %.

Exam boards: this lesson matches the AQA and Pearson Edexcel GCSE computing courses. Check which course your school follows.

Whiteboard video lesson: Numbers and calculations

17-minute video lesson

Teaching, worked examples and 20 practice questions solved step by step.

Watch free for a month

What your child will learn

  • Name Python data types
  • Convert input to numbers
  • Use arithmetic operators
  • Debug type errors

The method

  1. String.
  2. int / float.
  3. Operators.
  4. print.

Key words: data type, integer, float, string, int(), operator.

Worked examples

Worked examples from the lesson, with every step.

Question 1

What data type does input() give?

  1. Step 1: Text

Answer: string

Question 2

What does int() do?

  1. Step 1: Whole

Answer: converts to a whole number (integer)

Question 3

What does float() do?

  1. Step 1: Decimal

Answer: converts to a decimal number