Guest User

hehexdlolpython

a guest
Mar 28th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1.  
  2. Name = input("What is your first Name?\n")
  3. while True:
  4. try:
  5. Age = int(input("What is your age?\n"))
  6. Year = int(input("What is your year group?\n"))
  7. break
  8. except ValueError:
  9. print ("BRRRRRRRRRRR, Try again")
  10. NameFirst = Name[0]
  11. NameMain = Name[1:3]
  12. Name = NameFirst.upper()+NameMain.lower()
  13. #print (Name)
  14. Username = (Name + str(Age))
  15. #print (Username)
  16. print ("This is your username for the quiz",Username)
  17. while True:
  18. Password = input("Please Enter a Password\n")
  19. PasswordCheck = input("Please Re Enter the password\n")
  20. if Password.lower() == PasswordCheck.lower():
  21. break
  22. else:
  23. print ("Passwords Do Not Match!\nPlease Re Try.")
  24. f = open( 'Users.TXT', 'a' )
  25. f.write(Username + '\n' + Password + '\n')
  26. f.close()
  27.  
  28. #Logon
  29. file = open('Users.TXT', 'r')
  30. Data = file.read()
  31. file.close()
  32. #print (Data)
  33.  
  34.  
  35.  
  36. import random
Add Comment
Please, Sign In to add comment