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 02:00
The word ‘play’ comes with many different interpretations and a variety of definitions. discuss some of the various meanings tied to the word play. why is the concept of play thought to be an important addition to the workplace? do some (brief) research online and give an example of how play in the workplace is being done right.
Answers: 2
question
Computers and Technology, 24.06.2019 04:30
1. web and mobile applications allow users to be actively engaged in an online activity. a true b false 2. some examples of business applications purposes are to collaborate, share files, meet virtually in real-time, and accept payments. a true b false 3. an education application would most likely do which of the following? a allow users to watch popular movies and tv shows b connect users with social and business contacts c confirm users' travel plans d teach users a new language 4. a uniform resource locator (url) is how the internet knows where to take users when an address is typed into a browser. a true b false 5. deon is required to provide the citation information for his sources. what type of information should he collect from his sources? a author name, title, date of publication, date of access, url b connections to background information c interesting facts and statistics d notes on important information
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
What are the benefits to using presentations to organize and deliver information in the workplace? they add visual appeal. they are easy to update. they ensure accuracy. they can be created quickly. the work can't be lost.
Answers: 1
question
Computers and Technology, 24.06.2019 22:10
How many different ways are there to order the eight jobs in the queue so that job usu comes somewhere before cdp in the queue (although not necessarily immediately before) and cdp comes somewhere before bbd (again, not necessarily immediately before)?
Answers: 1
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
Biology, 02.02.2020 17:03
question
Mathematics, 02.02.2020 17:03
question
Spanish, 02.02.2020 17:03
Questions on the website: 13722361