Skip to content

Exercise 1 of 10 · Output

Hello, Out Loud

What you will make

A banner with your own name inside it, printed by code you ran yourself.

The one new idea: print() puts text on the screen

Almost everything you write from here on will show you something. print() is how a program talks back to you — and how you check whether your code did what you thought.

Go straight to the code ↓

What print does

A computer does not tell you anything unless you ask it to. print is how you ask.

Whatever you put between the brackets of print(...) gets shown on the screen. If you wrap it in quotes, Python treats it as plain text and shows it exactly as written — letters, spaces, punctuation and all.

That is the whole idea. There is nothing hidden underneath it.

A worked example

Here is a different program, so you can see the shape of it without being given the answer:

Python
print("--> ready")
print("--> steady")
print("--> go")

Running that prints three lines:

Output
--> ready
--> steady
--> go

Three print lines, three lines of output, in the order they were written. Notice that the arrows and the spaces come out exactly as they were typed — Python did not tidy anything up or add anything of its own.

Your turn

The editor already holds a working program. It prints a banner: a row of = signs, two lines of text, then another row of = signs.

One thing is missing. The second line says YOUR NAME instead of your name.

Replace those two words with your own name, keep the quotes exactly where they are, and press Run.

That is the entire task. You are not expected to write a line from scratch yet.

If something goes wrong

If Python complains, it is almost always the quotes. The text you want printed has to sit between them — "Hello, Sam!" works, Hello, Sam! on its own does not, because without quotes Python thinks you are referring to something by name rather than spelling out text.

Nothing you do here can break anything. Change it, run it, change it again.

Write your code

Runs in your browser. Press Run (or Ctrl/Cmd+Enter) and the output is checked for you.

Ctrl/Cmd+Enter to run

Press Esc then Tab to move keyboard focus out of the code editor.

Ready
Output will appear here after you run your code.

The runtime is starting in the background. You can type now — it will be ready before you are.

The answer appears here once you have run your code at least once.

Things that often go wrong here

Deleting the quotes along with the placeholder
Without quotes, Python reads your name as the name of something in the program rather than as text, and reports that it does not know what it is.
Changing the wrong line
Only the second print line has a placeholder. The rows of = signs are the top and bottom of the banner and stay as they are.

Longer explanation: read the full lesson. Want a blank editor instead? Open the Python playground.