Your First Real Code
Time to run actual Python. One line. You've got this.
This is the moment. Everything so far has been preparation, and now you get to run real code — in Python, a friendly, popular language. No setup, no fuss. Just press Run.
Meet print
Throughout this course we used the made-up word show to mean "display on the screen." In real Python, that word is print. Look how close they are:
print("Hello, world!")Reading it in plain English: "Print (display) the text Hello, world! on the screen." That's a complete, real, working program. One line.
The small details, explained
printis the instruction — it means "display this."- The parentheses
( )hold the thing you want to print. - The quotes
" "mark it as text (a string — remember those?).
Printing "Hello, world!" as your first program is a tradition among programmers going back decades. You're joining a very long line of people whose first real code looked just like this. Welcome to the club.
Now you try
The code box has print("Hello, world!") ready to go. Press Run and watch your words appear. That output was produced by you, by a real computer following your instruction.
Then make it yours: change the words inside the quotes to anything you like — your name, a greeting, a joke — and run it again. For example:
print("My name is Alex and I just ran my first program!")Tip: Keep the quotes and parentheses in place — change only the words between the quotes. If something breaks, no worries at all: errors are how everyone learns. Just fix the quotes or parentheses and run again.
Press “Run code” to see the result.
Quick check
Q1 In Python, which instruction displays text on the screen?
Q2 In print("Hello, world!"), why is the message wrapped in quotes?
Want to save your progress? It's free.
Create a free account