Question Detail
Question
In the ATM Security Check example, the
while pin != '1234': loop continues to run. What specifically makes this loop 'run forever until the correct PIN is entered'?
Correct Answer
Option C is the correct answer.
Detailed Explanation
The condition
pin != '1234' evaluates to True if the pin entered by the user is any value other than '1234'. The loop repeats, prompting for input, as long as this condition remains True. The pin is updated by input() within the loop.
Hint
Focus on the meaning of the
!= operator (not equal to) in the while condition and how it evaluates each time.