Lesson 1 of 4
Hello, World
Welcome to the Shire! Every programmer's journey starts with one line that makes the computer say something back.
In Python, that line uses print():
Press Run and the output shows up in the terminal. Try changing the message and running it again.
Comments
Lines starting with # are comments. Python skips them, so they're notes for humans:
You can print several things at once by separating them with commas. Python puts a space between them:
print("Second", "breakfast") # prints: Second breakfast
Exercise: Greet the Shire
Write a program that prints exactly:
Hello, Shire!
Your turn!
Write your code in and press Submit answer.
- program → Hello, Shire!