Input means obtaining data from outside the program, normally typed by the user at the keyboard.
name ← USERINPUT
The program pauses, waits for the user to type something and press Enter, then stores what they typed in the variable.
The three rules that carry marks
1. Always prompt first.
# Poor — the user sees a blank flashing cursor and has no idea what to do
age ← USERINPUT
# Good — the user knows exactly what is wanted
OUTPUT 'Please enter your age in years'
age ← USERINPUT
A prompt is an OUTPUT statement immediately before the input. It costs one line and is frequently worth a mark in "write a program" questions.
A good prompt states the format expected: "Enter a mark between 0 and 100" is far better than "Enter a mark", because it prevents invalid input rather than merely detecting it later.
2. USERINPUT always returns a string.
This is the single most important practical fact in the subtopic. Even if the user types 25, the variable holds the two characters '2' and '5', not the number 25.
# WRONG — this concatenates or errors
age ← USERINPUT
nextYear ← age + 1
# RIGHT — convert first
age ← STRING_TO_INT(USERINPUT)
nextYear ← age + 1
Mark schemes for calculation and validation questions routinely include a mark for that conversion.
3. One USERINPUT reads one value.
To read five numbers you need five inputs — which means a loop:
FOR i ← 0 TO 4
OUTPUT 'Enter number ', i + 1
numbers[i] ← STRING_TO_INT(USERINPUT)
ENDFOR
Notice the prompt is inside the loop, so the user is asked afresh each time and can see which number they are on.
AQA tip. In exam code, write the prompt, the input and the conversion as a three-line unit. Doing it automatically means you never lose the conversion mark in a question that was really about something else.