Question: main: Here, the program asks the user for a valid username by calling the get _ valid _ input function. If the username exists in

main:
Here, the program asks the user for a valid username by calling the get_valid_input
function.
If the username exists in the users_passes variable, the program asks the user for the
password by calling the get_valid_input function again.
i. If the password given by the user and the real password (obtained by calling
the retrieve_password function) are identical, the user will have
successfully logged in.
ii. Otherwise, the user will be told that the password is incorrect.
If the username does not exist in the users_passes variable, the program asks the user
if s/he wants to add an account as either Y or N.
i. If the user answers with a string that starts with Y after converting the first
letter to uppercase, the program asks the user for the username and password
by calling the get_valid_input function and adds the account to the
users_passes string by calling the add_account function and prints the
resulting users_passes. Write this program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!