Python ยท Lesson 2 of 5
๐ฆ Variables
Store numbers and words in named boxes.
A variable is a box with a name. You put a value in it with =, and use the name later.
name = "Aarav"
age = 11
print(name, "is", age, "years old")OUTPUTAarav is 11 years old
You can change what is in the box. The newest value wins.
score = 10
score = score + 5
print(score)OUTPUT15
๐ก Variable names cannot have spaces. Use my_score, not my score.
โ๏ธ Your turn
Open this example in the playground, change it and run it.
๐ง Quick quiz