Question: Write a program that authenticates a user by password. Assume for this exercise that the correct password is Password. Your program should prompt the user
Write a program that authenticates a user by password. Assume for this exercise that the correct password is Password. Your program should prompt the user to enter a password and allow the user three attempts to enter the correct one. If the user enters the correct password, output Welcome; otherwise output Invalid password. Please try again until the three allowed attempts are used. If the user fails after three attempts, output Access denied.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
