Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. User_Name = raw_input('what is your desired user name?: ')
  2. password = raw_input('what is your desired password?: ')
  3. numTries = 0
  4. print ''
  5. print 'now to unlock the system'
  6.  
  7.  
  8. while numTries != 3:
  9.     inputtedName = raw_input('Enter your username: ')
  10.     if inputtedName == User_Name:
  11.         inputtedPass = raw_input('Enter your password: ')
  12.     else: numTries +=1
  13. if inputtedName == User_Name and inputtedPass == password:
  14.     print 'Congratulations, it worked!'
  15. if numTries == 3:
  16.     print "you have failed too many times, sorry"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement