polewworkshop.blogg.se

Please enter a 2-digit number password brains out
Please enter a 2-digit number password brains out




please enter a 2-digit number password brains out please enter a 2-digit number password brains out

Username=input('Enter username: ') and password=input('Enter password: ') # you can not assigning and operator in the input because of no if condition in this line, also you should compare the values of the input Username=bank_admin # string assignment error in syntax, anyway Password=Hytu76E # string assignment error in syntax, anyway Issues in your code: # you are assigning string value, what for? this would make the loop hit positive the first time If password='Hytu76E' and username='bank_admin':Ĭount+=1 # as per gbse, in the comments, you will need the + to count up # you are collecting user input from CLI separately (you can not assign and operator to such operation as per your code )

please enter a 2-digit number password brains out

While password!='Hytu76E' and username!='bank_admin' and count < 3: # looping will continue when wrong input for three times and ask again. # "" or '' because you are assigning a value string into it Here try this (I try to change your code as less as possible so that you can identify the same logic yourself) print('Enter correct username and password combo to continue')






Please enter a 2-digit number password brains out