+ 2

How to loop a certain section if input is invalid.

Just wanting to loop password part at the end...Help? https://code.sololearn.com/cj1VIVeH85E8/?ref=app

2nd Jan 2019, 8:31 PM
Carson Curry
Carson Curry - avatar
3 Respuestas
+ 7
Put it in an infinite loop: while True: x =input("Enter your desired password...Numbers only.") y = input("Enter your password again.") if y != x: print("Error, input not identical try again...") else: break
2nd Jan 2019, 8:45 PM
Anna
Anna - avatar
+ 2
Thank you!😋
2nd Jan 2019, 8:47 PM
Carson Curry
Carson Curry - avatar
+ 2
You're welcome 😀
2nd Jan 2019, 8:48 PM
Anna
Anna - avatar