You only have three attempts.
A four digit personal identification number (PIN) is required to access a system. If the user enters the PIN correctly they can continue. If the user enters the PIN incorrectly they are prompted for their PIN again. There are a maximum of three attempts, after which the user is locked out for security.
⭐⭐⭐
Write a program that asks the user to enter their PIN. If they enter the incorrect PIN three times, the program outputs, “Locked out.” If they correctly enter 7528 the program outputs, “Security check passed.”
Remember to add a comment before a subprogram, selection or iteration statement to explain its purpose.
get_pin that:main program so that:get_pin is called.Enter PIN: 2311
Enter PIN: 2213
Enter PIN: 7895
Locked out.
Enter PIN: 6753
Enter PIN: 9622
Enter PIN: 7528
Security check passed.
Enter PIN: 7528
Security check passed.