🐍 Python for kids · Class 5 · Lesson 1 of 18 · Free
Python Introduction & Setup
⏱ About 20 minutes · ▶ run real Python here — nothing to install · no sign-in
In this lesson you will
- Explain what Python is and why so many people use it.
- Write and run your own program with print().
- Read a simple Python error and fix it.
Your mother gives the cook a list: wash the rice, cut the onions, switch on the gas. The cook does each step, in order, exactly as written. A computer is like that cook, and Python is the language you use to write its list.
What is Python?
Python is a programming language. It is a way to give instructions to a computer.
Computers are very fast, but they cannot guess what you want. You must tell them every step clearly. Python lets you write those steps in words that look almost like English.
That is why Python is a favourite first language. Scientists at NASA, game makers, and companies like Google and Netflix use it every day.
Namaste, Python!
💡 A set of instructions for a computer is called a program.
How do I run Python without installing anything?
On this page, every code box has a ▶ Run button. Press it, and Python runs your code right here in the browser.
You can change the code in the box and press Run again. Try it! You cannot break anything, so experiment freely.
Later, at home, you can also install Python free from python.org. It comes with a simple editor called IDLE. But for this course, the browser is all you need.
💡 Tip: if your code gets messy, reload the page to get the original example back.
How does print() work in Python?
print() is a command that shows something on the screen. Whatever you put inside the brackets appears as output.
Python runs your lines from top to bottom, one at a time. So the first print() shows first.
You can give print() several things, separated by commas. Python puts a space between them for you.
▶print("Good morning, class!")2print("Today is Python day.")3print("My roll number is", 21)4print("Cricket", "bat", "ball")
No variables yet.
▌✏️ Change this code and run it yourself
Good morning, class! Today is Python day. My roll number is 21 Cricket bat ball
What is the difference between text and numbers?
Text inside quotes is called a string. Python prints a string exactly as you typed it, letter by letter.
Numbers without quotes are real numbers to Python. So Python can do maths with them before printing.
Watch the two lines below. They look nearly the same, but the quotes change everything.
▶print("5 + 3")2print(5 + 3)3print("Samosas:", 4 * 2)
No variables yet.
▌✏️ Change this code and run it yourself
5 + 3 8 Samosas: 8
💡 You can use "double" or 'single' quotes. Just start and end with the same kind.
What are comments in Python?
A line that starts with # is a comment. Python skips it completely.
Comments are notes for humans. They help you remember why you wrote something. They also help a friend understand your code.
You can also put # before a line to switch it off for a moment.
Hello, Meera! See you at lunch.
Why does Python care about spelling and brackets?
Python is very strict. print must be in small letters, with brackets, and quotes must come in pairs.
If something is wrong, Python stops and shows an error message. Do not be scared of errors! They tell you the line and often the fix.
Every programmer, even experts, sees errors every day. Reading them carefully is a real coding skill.
💡 Read the last line of an error first. It usually says what went wrong.
🤔 Predict the output
Think like Python: read the code and choose what it prints. You get the reason straight away.
Question 1. What does this print?
print("Hi")
print("Ravi")Question 2. What does this print?
print("2 + 2")Question 3. What does this print?
# print("one")
print("two", 3)🧩 Your challenge
Make your own ID card! Print four lines: your name, your class, your school, and your favourite food. Add a comment at the top that says what the program does.
Name: Aarav Class: 5 School: Sunrise Public School Favourite food: Pav bhaji
⚠️ Common mistakes (and how to fix them)
❌ Wrong
Print("Hello")NameError: name 'Print' is not defined
✅ Right
print("Hello")Python commands are case-sensitive, so print must be all small letters.
❌ Wrong
print("Hello)SyntaxError: unterminated string literal (detected at line 1)
✅ Right
print("Hello")Every string needs a closing quote, so Python knows where the text ends.
❌ Wrong
print "Hello"
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
✅ Right
print("Hello")In Python 3, print always needs round brackets around what you want to show.
📌 Remember
- Python is a language for giving step-by-step instructions to a computer.
- On this course you run Python in the browser with the ▶ Run button – no installation.
- print() shows text or numbers on the screen, one line per print().
- Text in quotes is a string and is printed exactly; numbers without quotes can do maths.
- Lines starting with # are comments, and Python skips them.
- Errors are helpful messages – read the last line to find the problem.
Finished the quiz and the challenge?
Questions students ask
Is Python good for kids to learn as a first language?
Yes. Python uses short, English-like words and has very little extra punctuation. Children aged 9 and up can write working programs in their first lesson.
Do I need to install Python to start this course?
No. Every lesson has a Run button that runs Python in your browser. If you want Python at home later, download it free from python.org; it includes the IDLE editor.
What is print() in Python?
print() is a built-in command that shows a message on the screen. You put the text in quotes inside the brackets, like print("Hello").
Can I learn Python on a mobile phone or tablet?
Yes, this course works in a phone or tablet browser. A laptop with a keyboard is easier for typing longer programs, but it is not required.