Advertisement
Guest User

Untitled

a guest
Oct 7th, 2017
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. import time
  2.  
  3.  
  4. def intro(): #Username and Password is displayed
  5. print("Hello, your username is: Greg232 ")
  6. time.sleep(1)
  7. print("Your password is: userword657")
  8. Username_verify()
  9.  
  10. def Username_verify():
  11. name = Username_Name()
  12. proceed = Username_Submit(name)
  13. print(proceed)
  14.  
  15.  
  16. def Username_Name(): #User must input the correct username and password given to them
  17. username = input('Username: ')
  18. double_check = input('Are you sure? ')
  19. if double_check == 'no':
  20. username
  21. if double_check == 'yes':
  22. print('Proceed...')
  23.  
  24. password = input("Password: ")
  25. double_check = input('Are you sure? ')
  26. if double_check == 'no':
  27. print("ok")
  28. if double_check == 'yes':
  29. Username_Submit(username)
  30.  
  31.  
  32.  
  33.  
  34. def Username_Submit(name):
  35. attempt = 0
  36. print(name[0], name[1])
  37. Submit == ''
  38. input("Submit?") #Double checks that the user is ok with what they entered
  39. if Submit == 'yes':
  40. if name[0] == 'Greg232' and name[1] == 'userword657':
  41. Username_Correct()
  42. while password != "userword657" and attempt <= 3:
  43. attempt = attempt + 1 #Username or/and password is not correct, they have 2 more attempts
  44. print("Your username or password is wrong.")
  45. print("You have 2 more attempts left. ")
  46. print("You have entered 3 attempts and you are locked out,")
  47. print("contact the network office.")
  48. else:
  49. Username_Name()
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57. def Username_Correct(): #User inputs correct username and password therefore can enter the system
  58. print("You may enter the system.")
  59.  
  60.  
  61.  
  62. intro()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement