Kids Coding
Hello, World
Your first program: print a line. Change the words. Run it again.
Your first program
print() is how Python talks. The words inside quotes are what it says. This program is one line. That is enough.
Hello, World
print("Hello, World!")What to notice
printis the command. Keep the round brackets.- The message sits in quotes:
"Hello, World!". - Python is picky about spelling.
Printandpritnwill fail.
Click Try it Yourself, change World to your name, and run it again.
When it goes wrong
If you forget a quote, Python stops and shows an error. Read the last line of the error. Fix that one thing. Run again.
This one works
print("Hello, explorer!")Real life
A name sticker on the first day of class.
The computer needs the words in quotes, just like the sticker needs your name written on it.
Name sticker
print("Hello, my name is Sam")Change one word. Run it. That is how this idea shows up outside the lesson.
Try it
Exercise 1: Print exactly Hello, StudyGrid! including the comma and the exclamation mark.
Show solution
print("Hello, StudyGrid!")