Loop Ex 3 - Login: Restrict Attepmts

Created By: M Ritter | Difficulty Level: 3

Description

An upgraded version of the login system from the previous problem is required. This version is to track the number of password attempts the user has. If the user has had 3 unsuccessful password attempts, the message "Access Denied" is displayed.

Puzzle

Drag from here

  • INPUT password
  • ENDWHILE
  • INPUT password
  • ENDIF
  • SET tries = 1
  • WHILE tries < 3
  • DISPLAY "Access Denied"
  • BEGIN
  • ELSE
  • END
  • DISPLAY "Access Granted"
  • IF password = 'xyz' THEN
  • CALCULATE tries = tries + 1
  • DISPLAY "Wrong password. Try again."

Construct your solution here