My First Python Program: Hello World

My First Python Program: Hello World

When I teach beginners, I always start with:

“Before building skyscrapers, every architect draws a small house. Before coding big apps, you write your first small program.”

In Python, that “small house” is the famous Hello World program.

Step 1 — Open Python

Depending on your setup:

  • Windows: Open Command Prompt → type python
  • Mac/Linux: Open Terminal → type python3
  • Mobile: Open your Python app (like Pydroid 3 or Pythonista)

You should see:

>>>

This is Python’s interactive mode, like a blank canvas ready for your first brush stroke.


Step 2 — Write Your First Line

Type:

print("Hello World")
Bash

Then hit Enter.

Step 3 — What Just Happened?

Python prints:

Hello World

Here’s how I explain it to my students:

  • print() is like speaking out loud to the computer.
  • "Hello World" is the message you want to say.
  • Parentheses () tell Python, “Hey, this is a command I want you to execute.”
  • Quotes "" tell Python, “Treat this as text, not as code.”

Analogy I love:

Think of Python as a robot. print("Hello World") is you telling the robot, “Say this to everyone.” And it obeys immediately.

Step 4 — Try Variations

You can change the message:

print("I am learning Python!")
print("Python is fun 🎉")
Bash

Notice how each line prints separately. This teaches sequence — one instruction after another.

Step 5 — First Learning Tips

  1. Syntax matters – small things like quotes or parentheses must be exact.
  2. Experiment – try printing numbers, symbols, emojis. Example:
print(12345)
print("Python ❤️")
Bash
  1. Errors are normal – Python will tell you exactly what’s wrong. Don’t panic; I call it Python’s “friendly feedback.”

Step 6 — Why Hello World?

I tell my students:

“Hello World is like learning to walk. You may wobble at first, but once you can walk, running comes naturally.”

It’s small, but it’s the foundation of all your future programs.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top