Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Name = input("What is your first Name?\n")
- while True:
- try:
- Age = int(input("What is your age?\n"))
- Year = int(input("What is your year group?\n"))
- break
- except ValueError:
- print ("BRRRRRRRRRRR, Try again")
- NameFirst = Name[0]
- NameMain = Name[1:3]
- Name = NameFirst.upper()+NameMain.lower()
- #print (Name)
- Username = (Name + str(Age))
- #print (Username)
- print ("This is your username for the quiz",Username)
- while True:
- Password = input("Please Enter a Password\n")
- PasswordCheck = input("Please Re Enter the password\n")
- if Password.lower() == PasswordCheck.lower():
- break
- else:
- print ("Passwords Do Not Match!\nPlease Re Try.")
- f = open( 'Users.TXT', 'a' )
- f.write(Username + '\n' + Password + '\n')
- f.close()
- #Logon
- file = open('Users.TXT', 'r')
- Data = file.read()
- file.close()
- #print (Data)
- import random
Add Comment
Please, Sign In to add comment