Press ▶ Run to see what your program does.
Lesson 25: Hello, Python! (print)
Level 4, Python First Steps. Your first line of real code: print shows words on the screen. The new word: string. It follows lesson 24, Level 3 test: Safe Hands. Next comes lesson 26, Variables: boxes with labels.
What the lesson explains
Hello, Python!. Write real code, and the computer does it.
print shows words. Words in quote marks are called a string. On the card: print("Hello, world!")
What you do first
Your first line. Print Hello, world!. One way to write it: print("Hello, world!"). It prints: Hello, world!.
The code on the screen
print shows words. The editor shows one line: print("Hello, world!"). Run it, and it prints "Hello, world!".
What you practise
Try it, "Your first line": Print Hello, world!. One way to write it: print("Hello, world!"). It prints: Hello, world!.
Try it, "Say it your way": Print your name. The editor opens with: print(""). One way to write it: print("Sam"). It prints: Sam.
Fix it, "A missing quote mark": Fix the line so it prints Hi. The editor opens with: print("Hi). One way to write it: print("Hi"). It prints: Hi.
Challenge, "A three-line poem": Print a poem of three lines. One way to write it: print("Roses are red") / print("Code is fun") / print("Python runs it"). It prints: Roses are red / Code is fun / Python runs it.
What PlayBuddy and PlayType say
PlayBuddy: "Welcome to Level 4! Today you write real code, and the computer does it."
PlayType: "Words go inside quote marks. Python prints them exactly as you wrote them."
Help in every lesson
Everything happens on a pretend computer in your browser, so nothing touches your real files. PlayBuddy and PlayType stand beside the board, cheer you on and say when it is your turn.
A green ring shows where to click the first time. After that you do it on your own, and if you slip twice the ring comes back.
Stars
The lesson has 4 things to do. Up to one slip in ten gives three stars, up to one in four gives two, and finishing always gives at least one. Stars and progress are saved in this browser only; there is no account.
About DayOneCode
DayOneCode is an independent learning site, not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.