Python foundations · 5 min

Hello, world

Write a line of Python and see what it does.

A Python program is a set of instructions. In this example Python reads the file from top to bottom. The built-in function print() displays a value, then moves to the next output line.

Quotation marks tell Python that the words inside are text, called a string. The parentheses hold the value you give to print(). A line starting with # is a comment for people reading the code, so Python skips it.

Follow the example

Python finds a call to print. The quotation marks delimit the string.

Try it yourself

Change both print calls so the program introduces the Academy. Match the two output lines below, including punctuation.

Target output

Hello, Academy!
I write Python.
Show a hint

Keep each line inside quotes and give each print call its own line of code.

Output

Ready

Run your code to see the output here.

The first run downloads Python. Code runs in your browser. Progress and drafts are stored on this device.

Show one solution
print("Hello, Academy!")
print("I write Python.")