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")Ready to learn02Read 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
Hello, Python!.What the checks look for
- Prints Hello, Python!
Take this with you
A short program still has exact syntax, and error messages help you find what is missing.