Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- def intro(): #Username and Password is displayed
- print("Hello, your username is: Greg232 ")
- time.sleep(1)
- print("Your password is: userword657")
- Username_verify()
- def Username_verify():
- name = Username_Name()
- proceed = Username_Submit(name)
- print(proceed)
- def Username_Name(): #User must input the correct username and password given to them
- username = input('Username: ')
- double_check = input('Are you sure? ')
- if double_check == 'no':
- username
- if double_check == 'yes':
- print('Proceed...')
- password = input("Password: ")
- double_check = input('Are you sure? ')
- if double_check == 'no':
- print("ok")
- if double_check == 'yes':
- Username_Submit(username)
- def Username_Submit(name):
- attempt = 0
- print(name[0], name[1])
- Submit == ''
- input("Submit?") #Double checks that the user is ok with what they entered
- if Submit == 'yes':
- if name[0] == 'Greg232' and name[1] == 'userword657':
- Username_Correct()
- while password != "userword657" and attempt <= 3:
- attempt = attempt + 1 #Username or/and password is not correct, they have 2 more attempts
- print("Your username or password is wrong.")
- print("You have 2 more attempts left. ")
- print("You have entered 3 attempts and you are locked out,")
- print("contact the network office.")
- else:
- Username_Name()
- def Username_Correct(): #User inputs correct username and password therefore can enter the system
- print("You may enter the system.")
- intro()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement