GCSE · Computer Science · AQA · Spec 8525

Output to display

A program that works something out but never shows you is a calculator with no screen: right answer, no use to anyone. Output is the part that talks.

Computer Science · Programming

Watch the screen fill up, one line at a time

A quiz-score program written in Python. The dark Output panel is exactly what the user sees. Press Next to run one line at a time.

Before you press Next: which lines will put something on the screen, and which lines will add nothing to it?

1 print("Quiz Results")
2 print("How many did you get right out of 20?")
3 score = int(input())
4 percent = score * 5
5 print("Score:", score)
6 print("Percentage:", percent)
7 print("Marks missed:", 20 - score)

Variables

Output

Quiz Results

Step 1: Our first output statement. print() sends whatever is inside the brackets to the screen. The text is in quotation marks, so it appears exactly as written, and the quotation marks themselves don't appear.

1 / 7

Tip: keep your eye on the Output panel, not just the highlighted line. Which lines make it grow?

Step 1 of 7: Our first output statement. print() sends whatever is inside the brackets to the screen. The text is in quotation marks, so it appears exactly as written, and the quotation marks themselves don't appear..

Exam line: Text inside quotation marks is displayed exactly as written. A variable name or a calculation without quotation marks is replaced by its value.
Watch out: Lines 3 and 4 change the variables but put nothing on the screen. If a program never outputs a value, the user never sees it, however cleverly it was worked out.

Predict, then check

One pair of quotation marks. See if you can spot the trap.

The variable total holds 12. What does print("total") put on the screen?

Computer Science · Programming

What will each line put on the screen?

Which kind of output does each statement produce?

Still to sort

A fixed string (0)

Text in quotation marks, shown exactly as written.

Where the line is: Quotes win: even a variable name or a sum is just text once it's inside quotation marks.

A variable's current value (0)

A variable name with no quotes. Its value is shown, not its name.

Where the line is: Put quotation marks round the name and you get the name, not the value.

The result of an expression (0)

A calculation with no quotes. It's worked out first, then only the answer is shown.

Where the line is: Put the same calculation inside quotes and it's shown exactly as typed, never worked out.

Text joined with a value (0)

Pieces glued together with + into one line of text. This is called concatenation.

Where the line is: In Python, every piece joined with + has to be a string, so a number gets converted with str() first.

7 of 7 still to sort.

Suppose name holds "Priya" and lives holds 3. Pick a statement, then pick the kind of thing it displays. The reveal tells you exactly what the user would see.

Watch out: The quotation marks decide everything. The same letters or the same sum can show as plain text or as a value, depending on whether they're inside quotes.

Computer Science · Spot the bug

Find the line that breaks

This Python program should tell the user what their coffees cost. The user types 2. Which line stops it working?

A student's program — which line goes wrong?

Computer Science · Input, process, output

Put the program back in order

The order these four lines must run in, so that the program works and makes sense to the user

1 · Runs first4 · Runs last
  1. print("Distance:", metres, "metres")

  2. metres = laps * 400

  3. print("How many laps did you run?")

  4. laps = int(input())

Watch out: A line can be perfectly correct and still be in the wrong place. A prompt shown after the input, or a result printed before it's been worked out, breaks the program for the user.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

How a program talks to the person using it, and why two little quotation marks change everything.

What you need to know

  • Output is data a program sends out to the user. Outputting to the display means showing text or values on the screen: results, messages or prompts.
  • A program outputs with an output statement followed by what to show: print() in Python, or OUTPUT in pseudocode.
  • An output statement can show a fixed string, the current value of a variable, or the result of an expression.
  • Text and values can be combined in one output by joining strings (concatenation). A number usually has to be converted to a string before it's joined on.
  • Output is the last part of input - process - output. A prompt comes before the input, and results should be labelled.

The big picture

Output is data a program sends out to the user. Outputting to the display means putting text or values on the screen with an output statement, such as print() in Python or OUTPUT in pseudocode. An output statement can show a fixed string (text in quotation marks, shown exactly), the current value of a variable, or the result of an expression. Text and values can be joined (concatenated) into one output, but a number usually has to be converted to a string first. Output happens at both ends of the input - process - output pattern: a prompt before the input, and labelled results after the processing.

Key points

1Quotation marks mean "show exactly this": print("score") shows the word score.
2No quotation marks means "show the value": print(score) shows whatever score currently holds.
3A calculation without quotes is worked out first, then only the answer is shown: print(20 - 16) shows 4.
4+ joins strings exactly as they are, with no spaces added, so put any spaces you want inside the quotes.
5In Python, str() converts a number to a string so it can be joined to text; leaving it out stops the program with an error.
6Prompt before input, labelled result after processing. A bare 80 means nothing to a user; Percentage: 80 does.

Worked example

Problem

The variable name holds "Sam" and the variable points holds the number 45. Write ONE line of Python that uses + to display exactly: Sam has 45 points

⚠ Watch out

Putting quotation marks round a variable name. If total holds 12, print("total") shows the word total, not 12. Quotes mean "show exactly this"; to show the value, write print(total) with no quotes.

🧠

Memory hook

Quotes = copy, no quotes = look up. Anything in quotation marks is copied to the screen letter for letter; anything without them gets looked up or worked out first.

✓

Check yourself

temp holds 21. What do print("temp"), print(temp + 4) and print("Temp: " + str(temp)) each display? And what goes wrong with print("Temp: " + temp) in Python?

Flashcards

(12)
What is output?
Data a program sends out to the user. Output to the display means showing text or values on the screen.
How does a program put something on the display?
With an output statement followed by what to show, e.g. print() in Python or OUTPUT in pseudocode.
Name the three kinds of thing an output statement can show.
A fixed string (text in quotes), the current value of a variable, or the result of an expression.
score holds 9. What's the difference between print("score") and print(score)?
The first shows the word score (quotes mean show exactly this). The second shows 9 (no quotes means look up the value).
What does print(6 * 7) display, and what does print("6 * 7") display?
42, then 6 * 7. Without quotes the expression is worked out; in quotes it's just text.
Do the quotation marks appear on the screen?
No. They only mark where the text starts and ends.
What is concatenation?
Joining strings together into one string, e.g. with + in Python.
Why write str(total) in print("Total: " + total)?
total holds a number. str() converts it to a string so + can join it to the text. In Python, leaving it out causes an error.
Does + add a space between the pieces it joins?
No. It joins them exactly, so any spaces you want must be inside the quotation marks.
What is a prompt, and when is it shown?
Output that tells the user what to enter. It's shown before the input is taken.
Why should results be labelled?
So the user knows what each value means: Percentage: 80, not just 80.
Where does output fit in the input - process - output pattern?
At the end: the program takes input, processes it, then displays the result.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More AQA GCSE Computer Science topics

See the full AQA Computer Science curriculum →

How this lesson was checked. This AQA GCSE Computer Science (specification 8525)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 30 September 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.