Python for Beginners
Guided lesson · 8 minutes

1. Run a small Python program

Work through the guide, keep private notes, and mark this lesson complete when you’re ready.

01

Run code and inspect the result

Python executes instructions in order. A print statement displays a value so you can check what the program is doing. Use a short file and change one line at a time when you are learning a new behavior.

02

Read errors as clues

An error message often names the line where execution stopped. Check spelling, brackets, quotation marks, and indentation around that line. The reported line is a useful starting point, even when the original mistake is just above it.

03

Try it

Run print("Hello, world") in a Python interpreter. Change the text and run it again. Then remove a quotation mark and read the error before correcting it.

Key takeaways

  • Python follows instructions in order.
  • Print output to inspect a value.
  • Use error messages to guide small fixes.
Enroll in this course to save lesson progress.View course