Welcome to your first step in learning Python! In this lesson, you’ll write your very first program — the classic “Hello, World!” message. It’s a time-honored tradition in programming, and it’s the perfect place to start.
“Hello, World!” is the simplest program you can write in any programming language. Its only job is to display the message Hello, World!
on the screen. This simple program helps you:
You can run Python in many ways:
print("Hello, World!")
That’s it! Just one line.
hello.py
and run:python hello.py
You should see:
Hello, World!
🎉 Congratulations — you’ve written your first Python program!
Let’s break it down:
print("Hello, World!")
print(...)
is a function that outputs whatever is inside the parentheses."Hello, World!"
is a string — a sequence of characters enclosed in quotation marks.Why do programmers always start with “Hello, World!”?
It goes back to the 1970s, when a book on the C programming language used it as the first example. It’s simple, friendly, and instantly gives you success with just one line of code.
print()
function is used to display text.Try printing something else! For example:
print("Welcome to Python!")
print("My name is Ada.")
print("Let's start coding!")
Experiment and have fun — that’s the best way to learn.