Today you write your very first Python program. No installs needed to understand โ every code box below runs when you press โถ Run.
1Meet your team
๐
Py the Snake: Hi! I'm Py. Python is named after a comedy show, but my job is to make it EASY. Stick with me!
๐ค
Bittu the Robot: I am the computer. I am very fast and very obedient โ I do EXACTLY what you type. Not what you meant. What you typed. ๐
๐ฆ
Professor Hoot: I drop wise tips. ๐ฆ First tip: you cannot break anything by trying. Press every button on this page!
๐
Bugly: And I'm the bug! I show up when code goes wrong. You'll beat me a lot. Sadly.
2What is Python?
Python is a language for talking to computers. You write instructions, the computer follows them โ like giving directions to a super-fast robot friend.
๐ค
Bittu: Tell me what to do in Python and I'll do it a MILLION times without getting bored. Try me.
People use Python to build games, apps, websites โ even AI like ChatGPT started with ideas like these.
3print() โ your first magic spell
The spell is called print(). Whatever you put inside the quotes, the computer says out loud (on the screen). Press โถ Run!
๐
Py: See the quotes " "? They tell me: this is TEXT, just say it. Change the words, it says YOUR words.
4Try it: the Print Machine ๐จ๏ธ
Type anything, press PRINT, watch Bittu say it:
โฆwaiting for your wordsโฆ
The repeat trick: print("Ha" * n) โ slide n!
n = 3
HaHaHa
๐ฆ
Professor Hoot: Multiplying text repeats it! "Ha" * 3 becomes HaHaHa. Computers love patterns.
5When Bugly attacks ๐
๐
Bugly: Heheheโฆ what if you type Print with a capital P? Run it and see!
๐
Py: Python is case-sensitive: print and Print are different words to Bittu. Errors are NOT scary โ read the last line, it tells you what went wrong.
6Quick quiz! ๐ง
What does print("Pizza" * 2) show?
๐ก Multiplying text repeats it with no spaces: PizzaPizza. (Real pizza sadly not included.)
Which one works?
๐ก Only lowercase print is the real spell. The others make Bugly very happy.
7Your mission ๐
Mission 1: Open colab.research.google.com (free, works in your browser), make a new notebook, and print your own name.
Mission 2: Print your favourite food 5 times using the * trick.
Mission 3: Type Print on purpose, read the error, then fix it. Congratulations โ you just debugged!
Day 1 complete! You made a computer talk. ๐
Tomorrow: variables โ magic boxes that remember things for you.