Skip to content
← Python for AI/ML · all 50 levels

Variables

Level 3 of 50 · Basics

Level 3 of 50

Variables

explained with PSL scores. Watch the reel, then work through it below: run the code, take the quiz, keep the cheat sheet.

📒 Open the cheat sheet
SanaThe PSL score keeps changing! How does the screen remember it?
TeacherWith a variable! A box with a name, holding your data!
score.py
score = 150
print(score)
TeacherMake a box called score. Put 150 inside. Print it!
SanaWait, = doesn't mean equal?
TeacherNot here! = means store. The value on the right goes into the box on the left!
score.py
score = 150
score = 156
print(score)
TeacherSix runs! Same box, new value. The old one is gone!

⏸ Pause & predict: what prints?

city = "Lahore"
print("city")

Where this leads

Python is step one. Building AI that ships is the rest.

The diploma takes you from zero to deployed computer vision, LLM and agent projects, with engineers who build them for a living. Already code? The bootcamp does it in three months.