HW #4

You have a lot of unnecessary code here. For example, you've repeated your if 3 times instead of allowing the While loop to just loop. Consider this:


    COUNTER = 3
    # we use `not` here because ACCESS is already True/False
    # Since the output of == is True or False, it's redundant
    while not ACCESS:
        if data x == data.PASSWORD:
            ACCESS = True  # once set to True, the while loop will naturally stop
        COUNTER -= 1  # this decrements our counter
        if COUNTER < 0:  # since it naturally decrements, this is an easy way to test if attempts are exceeded
            break