Conditional+Loop+-+Password

A program is required to ask a user to enter a password until it has been entered correctly. If the user enters the wrong password they should see a message telling them.

When they enter the correct password they should be given a message to tell them.

//Please enter your password// > abc123

//Sorry that is the wrong password, please enter your password// > scotland01

//Sorry that is the wrong password, please enter your password// > shard2!

//Thank you, that is the correct password//

This approach is known as **input validation**. The program keeps asking the user to inpout some data until the data is valid.