Question: Access Program Write a program that reads a string ( password ) and an integer. The program will keep asking the user for a password
Access Program Write a program that reads a string password and an integer. The program will keep asking the user for a password and number as long as the user does not provide the expected values terps and respectively and as long as the user has not exhausted the maximum number of attempts for this project You can assume the user input will always be one word for the first prompt and an integer for the second. In addition, the program will stop asking for data if the word "quit" is provided as a password value in this case, the program will not read the number The program will print the message "Wrong credentials" Twhen an invalid password or number or both is provided. If the user eventually provides the correct credentials the message "Access Granted" will be displayed; otherwise the message "Access Denied" will be generated. Use a while loop not do while to make this program. The following example illustrates the messages to use to read data and to display results.Access Program Write a program that reads a string password and an integer. The program will keep asking the user for a password and number as long as the user does not provide the expected values terps and respectively and as long as the user has not exhausted the maximum number of attempts for this project You can assume the user input will always be one word for the first prompt and an integer for the second. In addition, the program will stop asking for data if the word "quit" is provided as a password value in this case, the program will not read the number The program will print the message "Wrong credentials" Twhen an invalid password or number or both is provided. If the user eventually provides the correct credentials the message "Access Granted" will be displayed; otherwise the message "Access Denied" will be generated. Use a while loop not do while to make this program. The following example illustrates the messages to use to read data and to display results.
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
