In order to get into your secret club, someone needs to know the password! Write a program that asks the user for the password, if they get it wrong, tell them they are wrong, if they get it right, tell them they got it right. Use a loop to keep asking them until they get it right! The Password is: MA122 This is an example of interaction with the user. You are prompting the user with "What's the password? " and they are entering "cream", then they are told they are "Wrong!"… and this keeps looping. What's the password? cream Wrong! What's the password? dog Wrong! What's the password? MA122 Correct!
In order to get into your secret club, someone needs to know the password! Write a program that asks the user for the password, if they get it wrong, tell them they are wrong, if they get it right, tell them they got it right. Use a loop to keep asking them until they get it right! The Password is: MA122 This is an example of interaction with the user. You are prompting the user with "What's the password? " and they are entering "cream", then they are told they are "Wrong!"… and this keeps looping. What's the password? cream Wrong! What's the password? dog Wrong! What's the password? MA122 Correct!
Chapter5: Looping
Section: Chapter Questions
Problem 15E
Related questions
Question
In order to get into your secret club, someone needs to know the password! Write a program that asks the user for the password, if they get it wrong, tell them they are wrong, if they get it right, tell them they got it right. Use a loop to keep asking them until they get it right!
The Password is: MA122
This is an example of interaction with the user. You are prompting the user with "What's the password? " and they are entering "cream", then they are told they are "Wrong!"… and this keeps looping.
What's the password? cream
Wrong!
What's the password? dog
Wrong!
What's the password? MA122
Correct!
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,