📚
Hello World
Your First Python Command
When you write a program, the computer does exactly what you tell it — but it won't show you anything unless you specifically ask it to. That's what
print()Here's how it works:
print("Hello, World!")
Let's break this down piece by piece:
- ◆— the name of the command (called a function)
print - ◆— parentheses tell Python "here's what I want you to print"
( ) - ◆— the text you want to display, wrapped in quotes
"Hello, World!"
The quotes are important! They tell Python "this is text, not a command." You can use single quotes
'Hello'"Hello"print("Hello!") # → Hello! print('Hello!') # → Hello! (same result) print(42) # → 42 (numbers don't need quotes)
💡💡 Your Turn: Write
in the editor and click Run. You've just written your first Python program!print("Hello, World!")
main.pySandbox
main.py
Ctrl + Enter