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 getvalidinput
function.
If the username exists in the userspasses variable, the program asks the user for the
password by calling the getvalidinput function again.
i If the password given by the user and the real password obtained by calling
the retrievepassword 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 userspasses variable, the program asks the user
if she 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 getvalidinput function and adds the account to the
userspasses string by calling the addaccount function and prints the
resulting userspasses. Write this program
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
