make an algorithm using pseudocode and python which will get atm pin code from user. if the pin is "1234" then it should display correct otherwise if the pin is incorrect 3 times it should display account locked
// corecudr
test = True
attempt = 0
while test:
n = int(input())
if n == 1234:
print("Correct")
test = False
else:
attempt += 1
if attempt == 3:
print("Your account has been locked")
test = False
Example:
12345
6578
890
Your account has been locked
1234
Correct
Comments
Leave a comment