pwManager
pwManager copied to clipboard
Issue in password_manager.py on line 26
Hi. I was also making password manager, and so went through the repository and copied a piece of code from password_manager.py. But found an error in the 'while block' if you choose '3' it runs the function for infinite times. Since it will not check else code . You can try with this:
`def menu(): print('-'*30) print(('-'*13) + 'Menu'+ ('-' *13)) print('1. Print one') print('2. Print two') print('3. Print three') print('Q. Exit') print('-'*30) return input(": ")
choice = menu()
while choice!="Q": if choice=="1": print("choice is one") if choice=="2": print("choice is two") if choice=="3": print("choice is three") else: choice= menu()
exit() ` can be fixed by putting if block again
if choice!="1" or choice!="2" or choice!="3":
Fixed this bug with PR #22
Get rid of the else
-line and unindent choice=menu()
Also good to change if
-statement 2 and 3 to elif
-statements.