I have looked over sources about loops and included the else statement, in this code, I found that I have a problem where if the password is indeed password_confirmation then it loops and doesn’t stop, here’s the code:
tried_passcode = []
name = input("whats your name? ")
print("hello " + name + " ")
password = input("make ur passcode: ")
print("thanks")
password_confirmation = input("enter ur passcode: ")
tried_passcode.append()
while True:
if password == password_confirmation:
print("welcome " + name)
else:
print("sorry " + name + "your passcode is incorrect, you've tried: ")
By the way, am I doing the append code right? It doesn’t seems to work properly…
I tried to add else statement’s and such, included and tried different indents, the code works, there was no errors or anything just that it spams “sorry " + name + "your passcode is incorrect, you've tried: " over and over again and doesn’t seems to stop…