GCSE · Computer Science · AQA · Spec 8525
Output to display
A program that never shows you its answer is a calculator with no screen. Output is the part that talks, and two tiny quotation marks decide what it says.
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 * 55 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.
Tip: keep your eye on the Output panel, not just the highlighted line. Which lines make it grow?
Predict, then check
One pair of quotation marks. Looks harmless. Commit to an answer before you peek.
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.
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.
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: results, messages or prompts shown on the screen.
- You output with an output statement followed by what to show: print() in Python, or OUTPUT in pseudocode.
- Text inside quotation marks is a fixed string. It appears exactly as typed, and the quote marks themselves stay off the screen.
- Leave the quotes off a variable's name and you get its current value instead of its name.
Have a gocoins holds 50. Your mate writes print("coins") and bets you a biscuit the screen will show 50. Who wins the biscuit, and what actually appears?
You win. The screen shows the word coins.
The quotation marks make it a fixed string, so the name is copied letter for letter; your mate needed print(coins) with no quotes to see 50.
- Leave the quotes off a calculation and it's worked out first. Only the answer appears.
Have a goWrite one print statement in Python that shows the number of hours in a year, using 365 * 24, so the screen shows the answer rather than the sum.
print(365 * 24), which shows 8760.
With no quotes the expression is worked out first and only the answer appears; print("365 * 24") would just show the sum as text.
- You can join text and values into one output. Joining strings like this is called concatenation.
- Here's the catch: a number usually has to be converted to a string before it's joined on.
Have a gogoals holds the number 3. Fill the gap so this Python line shows Goals: 3 print("Goals: " + ____)
str(goals)
goals holds a number, so it has to become a string before + can join it; writing just goals stops Python with an error, and writing "goals" shows the word, not 3.
- Output is the last stage of input - process - output: take input, process it, then display the result.
- A prompt is output too. It comes before the input and tells the user what to enter.
- Label your results so the user knows what each value means.
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
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. It looks right on the page, which is exactly why it catches people. 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?
How does a program put something on the display?
Name the three kinds of thing an output statement can show.
score holds 9. What's the difference between print("score") and print(score)?
What does print(6 * 7) display, and what does print("6 * 7") display?
Do the quotation marks appear on the screen?
What is concatenation?
Why write str(total) in print("Total: " + total)?
Does + add a space between the pieces it joins?
What is a prompt, and when is it shown?
Why should results be labelled?
Where does output fit in the input - process - output pattern?
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 postedMore AQA GCSE Computer Science topics
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 29 October 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.