Skip to content
Menu

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 %.

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

The first three practice questions 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