Lesson 1 of 14 · 5 min

Your first program

A program is a list of instructions the computer follows from top to bottom. In Python, printing a message is one line:

print("Good morning!")
  • print is a built-in function: a command that does a job. Its job is to show text.
  • What you want printed goes inside the brackets.
  • Text goes inside quotes. Text in quotes is called a string.

Each print starts a new line:

print("Line one")
print("Line two")

Python runs right here in your browser. The very first run downloads Python itself (about 10 MB), so it takes a few seconds; after that, runs are instant.

Your task

Write a program that prints:

  1. Hello, world!
  2. Python is fun.

Press Run ▶ to see the output, then Check my code.

main.py
# Write your first line of Python below.

Python 3.14 runs right here in your browser. The first run downloads about 10 MB; after that it is instant.

Discussion

Stuck? Ask here. Be kind, and share hints rather than full answers.

Loading the discussion…