← Python Basics
Lesson 1 of 3
Variables and types
Watch, read the card, then practise. Variables · Data types · Converting types
The video for this lesson is being recorded.
Meanwhile, the notes below and the 60-second cards cover the same ideas.
Practise this topicVariables
A variable is a name that points to a value, so you can use and change it later.
Remember: = means 'store this', not 'is equal to'.
Data types
Every value has a type, and the type decides what you can do with it.
Remember: "7" (text) and 7 (number) are different things.
Converting types
You can change a value from one type to another with int(), float() and str().
Remember: input() always gives text. Convert it before doing maths.
Try the example in Code Lab
marks = 82 marks = marks + 5 print(marks)