Signed up recently but had issues with the confirmation email?

Click Forgot password and follow the reset steps. You can choose the same password you used when you signed up. This should then provide access.

Remember to check Spam and Junk. The email will be from auth@progressbytes.co.uk.

Revision notesQuestionsFor schools
Revise Computing
Log inStart revising free
Revision notesQuestionsFor schoolsLog in
GCSE Computer Science/Supplementary programming practice/Output and Sequence

Literals vs variables

301.1 Output and Sequence

Practise exam questions

Output and Sequence — Note 2 of 3

Output both fixed text and variable values.

What you need to know

A literal is a fixed value written directly in the code (like "hello" or 42). A variable is a named container whose value can change. You can print both in the same statement.

What to know

  • A literal is a value typed directly: "hello", 42, 3.14
  • A variable stores a value that can change: name = "Alice"
  • print() can mix literals and variables using commas
  • Changing a variable does not affect previous output

Code examples

Literals vs variables
python
name = "Alice"
print("Hello", name)
print("The number is", 7)
← Previous noteBasic print / output301.1 Output and SequenceNext note →Sequence execution301.1 Output and Sequence

Back to Output and Sequence

Specification notes for programming are in Paper 2.

Output and Sequence

Note 2 of 3

  1. 1Basic print / output
  2. 2Literals vs variables
  3. 3Sequence execution
Topic overview

© 2026 Revise Computing · revisecomputing.co.uk

Worried about something?Question Bank UpdatesPrivacy noticeTermsContact

Revise Computing is an independent revision resource. It is not affiliated with, or endorsed by, OCR (Oxford Cambridge and RSA Examinations).