Task 18 proved to be a very interesting design challenge. We ended up with a design that required lots of IF..ELSE statements.
![](https://blogs.glowscotland.org.uk/nl/public/ColtnessHS-ComputingScience/uploads/sites/12638/2016/09/Slide2.png)
A conditional loop is used to repeat part of the program until a condition is true.
The program shown here is a password checker. The program will exit the loop if the user guess is 1233 or the user has had 3 attempts. This uses a complex conditional statement with the logical operator OR, the OR logical operator returns a true value when one of the conditions are true.
The final IF statement checks if the user has entered the correct password before saying welcome.
Glow Blogs uses cookies to enhance your experience on our service. By using this service or closing this message you consent to our use of those cookies. Please read our Cookie Policy.