FoundationsLesson 1 of 1910 min
Hello, Python
What Python is, how a program actually runs, and your first working script.
By the end you will be able to
- Explain what an interpreter does with your code
- Print text to the console with print()
- Write comments that explain your intent
Python is a general-purpose programming language. You write plain text instructions in a file, and a program called the interpreter reads them top to bottom and carries them out immediately.
That "top to bottom, one line at a time" model is the single most useful thing to hold in your head as a beginner. There is no hidden starting point and no magic — execution begins at the first line of the file and walks down.
Your first instruction
print() displays a value. The text inside the quotes is a string — a piece of text. Press Run below and watch the output panel.
Hello, Python!
— expected output; press Run to execute it yourselfEverything to the right of print lives inside parentheses. Those parentheses mean call this thing. print is a function, and calling it with a value hands that value over to be displayed.
You can pass several values at once, separated by commas. Python puts a single space between them.
CodeNest 2026
Line one
Line two
— expected output; press Run to execute it yourselfComments
A # marks the rest of the line as a comment. Python ignores it completely. Comments are for humans reading the code later — usually you.
Visible
— expected output; press Run to execute it yourselfExercise
Print exactly two lines: first Hello, world!, then your own name on the line below it.
Press Run to execute this code.