subject

Write a program that reads a string (password) and a number. The program will keep asking the user for a password and number as long as the user does not provide the expected values ("milkyway" and 1847, respectively), and as long as the user has not exhausted the maximum number of attempts . 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" when 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. The following example illustrates the messages to use to read data and to display results.
Enter password: milkyway
Enter number: 10
Wrong credentials
Enter password: tomato
Enter number: 1847
Wrong credentials
Enter password: milkyway
Enter number: 1847
Access Granted

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
Program description: a c# app is to be created to produce morse code. the morse code assigns a series of dots and dashes to each letter of the alphabet, each digit, and a few special characters (such as period, comma, colon, and semicolon). in sound-oriented systems, the dot represents a short sound and the dash represents a long sound. separation between words is indicated by a space, or, quite simply, the absence of a dot or dash. in a sound-oriented system, a space is indicated by a short period of time during which no sound is transmitted. the international version of the morse code is stored in the data file morse.txt.
Answers: 3
question
Computers and Technology, 22.06.2019 10:00
What is a society that has moved to the internet rather than relying on physical media called
Answers: 2
question
Computers and Technology, 22.06.2019 21:30
The graph shows median weekly earnings for full-time workers according to education level. which can you not conclude?
Answers: 2
question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. andre was recently hired by an organization to check for system vulnerabilities. he is supposed to exploit these vulnerabilities and create a report on the extent of damage to which the system was susceptible. what position does andre hold in this organization? a. information security analyst b. information assurance manager c. penetration tester d. network security engineer e. chief information security officer
Answers: 2
You know the right answer?
Write a program that reads a string (password) and a number. The program will keep asking the user f...
Questions
question
Chemistry, 01.07.2020 15:01
Questions on the website: 13722367