Advertisement
Guest User

Untitled

a guest
May 8th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. tentativa = 0
  2. while tentativa < 3:
  3. username = raw_input(" Insere o nome de utilizador: ")
  4. password = raw_input(" Insere a password: ")
  5. if username == "joao" and password == "123":
  6. print "login realizado com sucesso!"
  7. break
  8. else:
  9. tentativa += 1
  10. print "login incorreto!"
  11. if tentativa == 3:
  12. print "esgotaste as tentativas!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement