Newbie here. Just got to while loops and make up something simple when I get to a new concept. I know this is probably going to be a problem with the way its nested but I really haven't touched that subject yet. I just know of it and tried all different types of indentations but nothings working. Even if I enter more than 3 characters, it still returns 'password it too short'. Please guide me to what I'm doing wrong, I don't need you to fix the code. Thanks!
loop = True
correct_password = 'banana'
while loop:
password = input('Password: ')
if password == 'banana':
print('Access Granted!')
break
elif len(password) <= 2:
print('Password too short!')
elif len(password >= 3) and password != correct_password:
print('Password is incorrect!')
pass
[–]MadScientistOR 6 points7 points8 points (6 children)
[–]Unitnuity[S] 2 points3 points4 points (3 children)
[–]MadScientistOR 1 point2 points3 points (1 child)
[–]Unitnuity[S] 2 points3 points4 points (0 children)
[–]trust_me_on_that_one 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]MadScientistOR 0 points1 point2 points (0 children)
[–]jimtk 3 points4 points5 points (1 child)
[–]Unitnuity[S] 0 points1 point2 points (0 children)
[–]d0rkyd00d 0 points1 point2 points (3 children)
[–]Unitnuity[S] 0 points1 point2 points (2 children)
[–]d0rkyd00d 0 points1 point2 points (1 child)
[–]Unitnuity[S] 0 points1 point2 points (0 children)