Say hello

Your first Python program

Lesson 1 of 20 · 5 min · Module 1: Values & decisions

Python is known for being readable and friendly. You can write your very first program in just one line.

Start this lesson →

Free. No installation: you write and run the code in your browser, and it is checked automatically.

By the end, you’ll be able to…

  • Print a string value
  • Recognize a comment
  • Distinguish code punctuation from output

The idea

The print() function displays a value. Text goes between single or double quotes. Lines starting with # are comments.

print("Small steps, big ideas.")

01Quotes identify text

Python reads the characters inside matching quotes as a string. The quotes are syntax; they do not appear in the printed output.

print("Ready to learn")
Output
Ready to learn

02Read an error as a clue

A missing closing quote or parenthesis prevents Python from understanding the line. Check the position named in the error and compare the punctuation on both sides.

Your turn

Print the exact message Hello, Python!.

What the checks look for

  • Prints Hello, Python!
Try it in the editor →

Take this with you

A short program still has exact syntax, and error messages help you find what is missing.

Learn Python Foundations for free

20 short lessons with real code and instant checks.

See the whole course →