301.1 Output and Sequence
Practise exam questionsOutput and Sequence — Note 2 of 3
Output both fixed text and variable values.
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.
print() can mix literals and variables using commasname = "Alice"
print("Hello", name)
print("The number is", 7)Specification notes for programming are in Paper 2.