Run your first Python program
Print text, read output and recognize how Python runs a script.
- Print a message and describe what the interpreter does.
Python is a general-purpose programming language with readable syntax. A Python interpreter runs instructions in your script. The print() function displays information.
print("Hello, world!")Hello, world!
Text is written inside quotes. Parentheses pass that text to print. Python executes statements in order, from top to bottom.
Key takeaways
Print a message and describe what the interpreter does.
Read the output to check what your program did.
Keep indentation consistent in Python blocks.
Lesson quiz
5 questions · pass with 4 correct · up to 50 XP
Passing this quiz completes the lesson and keeps your streak going. Questions you miss come back in review sessions later.
Practice: write Python
Write Python in the editor and run it against sample inputs. Python runs locally in your browser using a WebAssembly runtime.
Say hello
Print exactly Hello, Python! on one line.
- Greeting
Python runs in a sandboxed browser worker with a 60 second time limit. Its runtime loads from the Pyodide CDN; your code stays in this browser.
Questions about this lesson
Stuck? Ask. Figured something out? Share it. Explaining is one of the best ways to learn.
Loading posts…