Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- print("-*-*-*-*-*-*-*-*-*")
- print("Welcome To This Quiz")
- print("-*-*-*-*-*-*-*-*-*")
- print()
- name=input("Please enter your name here: ")
- age=input("Please enter how old are you: ")
- print("Please wait,your username is being generated...")
- print()
- f = open("Usernames.txt","a")
- f.write(name[0:3]+age + "n")
- f.close()
- data = open("Usernames.txt", 'r')
- f =data.readlines()
- data = f[len(f)-1]
- print ("Your username is:",data[0:-1])
- print()
- answer_1 =name[0:3]+age
- answer_2 =input("Please create your password:")
- file= open('Passwords.txt', 'w')
- file.write(answer_2 + "n")
- file.close()
- pass_1 = open("Passwords.txt", 'r')
- file =pass_1.readlines()
- pass_1= file[len(file)-1]
- print ("This is your Password:" ""+ pass_1[0:-1])
- print()
- print("Login Now")
- getin_1 = input("Enter your Username: ")
- getin_2 = input("Enter your password: ")
- while getin_1 != answer_1 or getin_2 != answer_2:
- print("Incorrect")
- print("Please proceed")
- getin_1 = input("Enter your Username: ")
- getin_2 = input("Enter your password: ")
- print()
- print("Successfully loged in as:" " "+answer_1)
Add Comment
Please, Sign In to add comment