Input Function
Collecting a value with input() is only half the job. A program should do something useful with what the user typed, then show a result that clearly connects to that answer, so the user can see their own value being worked on.
Processing means using the stored value in a calculation or other operation to create something new. Responding means printing a message that presents that new result, and repeating the user's own figure where it helps them check the program used it.
A student has a daily screen time limit of 120 minutes. The program asks how many of those minutes have been used so far, takes the used minutes away from the limit, and reports what is left.
# daily screen time limit is 120 minutes
used = int(input("How many minutes of screen time have you used so far? "))
left = 120 - used
print("You have " + str(left) + " minutes of screen time left.")Output when the user types 45:
How many minutes of screen time have you used so far? 45
You have 75 minutes of screen time left.
The prompt asks for a number, int() turns the typed text into a whole number (Text Input and Casting covers this in more detail), 120 - used carries out the processing, and str() joins the answer into the sentence so it is displayed as part of a message rather than as a bare number.
A reply of just "75" leaves the user guessing what was worked out. "You have 75 minutes of screen time left" names what was calculated and gives the unit, so the response makes sense on its own. Good processing and a clear, relevant message turn a typed answer into something the user can actually use.
Edexcel GCSE Computer Science · Input Function