Welcome to the World of Code
In our book, Python for Kids from 8 to 88, we promised you a secret map to a world where you can create anything. This is the first step on that map.
Programming isn’t about being a math genius. It’s about giving clear instructions. Think about how you tell a friend to get to your house, or how you tell a dog to sit. Computers are just like very obedient dogs—they need you to tell them exactly what to do.
Setting Up Your Workshop
Before we cast spells, we need a wand. For programmers, that wand is the Python Interpreter.
Option A: The “Instant” Way (No Installation)
If you want to start right now, go to Replit.com or Trinket.io. You can write code in your browser without installing anything. It’s like borrowing a wand!
Option B: The “Pro” Way (Install on Computer)
- Go to python.org.
- Download the latest version for your computer.
- Install it.
- Open the program (search for IDLE on your computer).
IDLE is your playground. It’s where you type code and see what happens.
Your First Spell: print()
In Python, the word print doesn’t mean “send to a paper printer.” It means “Show this on the screen.”
Type this into your editor:
print("Hello!")
Now run it. (In IDLE, press F5. In Replit, hit the big generic “Run” button).
You should see:
Hello!
Why It Works
print: The command. It tells the computer “Say something.”(...): The parentheses hold the message."...": The quote marks wrap the text so the computer knows it’s a word, not a command.
Challenge
Can you make the computer say your name? Can you make it say “I am a coder”?
What Just Happened?
You gave an instruction. The computer obeyed. You didn’t just use a computer; you commanded it.
In the next lesson, we’ll learn how to make the computer remember things for us.
This post is part of the Python Basics for Kids series, based on “Python for Kids from 8 to 88”.