301.3 Variables and Constants
Practise exam questionsVariables and Constants — Note 1 of 4
Create named storage.
A variable is created by assigning a value with =. Python does not need a keyword like 'var' — the variable is created the moment you first assign to it.
= to assign: age = 15age = 16 overwrites the old valuename = "Alice"
age = 15
score = 89.5
print(name, age, score)Back to Variables and Constants
Specification notes for programming are in Paper 2.