dimanche 14 juin 2020

'If' loop' with and doesn't print message when inputs conditions are True [Python 3]

im learning python, im trying to write a mini code that check if user/keys inputs are correct, code is the next:

if emailstatus == True and email in UserKeys == True and UserKeys [email] == key :

  print ('Checked,  you can log in ')    

else:

  print ('wrong email or password, you can not log in')
'''

when i enter a correct email and password still cant login ( wich generates a triple True values

I FIXED THIS adding '()' to if condition in ( email in UserKeys ) == True

but still i dont understand the logic behind this error

Pd: complete program code is this

https://i.stack.imgur.com/xVQA8.jpg

Aucun commentaire:

Enregistrer un commentaire