60-second card
Variables
A variable is a name that points to a value, so you can use and change it later.
- Create one with = : marks = 82.
- Names use letters, digits and _, and can't start with a digit.
- Giving a variable a new value replaces the old one.
marks = 82
marks = marks + 5
print(marks)Prints
87Remember: = means 'store this', not 'is equal to'.
Common mistake: Writing 2marks = 82. Names can't start with a digit.