Guest User

Untitled

a guest
Nov 12th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. import time
  2. print("-*-*-*-*-*-*-*-*-*")
  3. print("Welcome To This Quiz")
  4. print("-*-*-*-*-*-*-*-*-*")
  5. print()
  6. name=input("Please enter your name here: ")
  7. age=input("Please enter how old are you: ")
  8. print("Please wait,your username is being generated...")
  9.  
  10. print()
  11.  
  12. f = open("Usernames.txt","a")
  13. f.write(name[0:3]+age + "n")
  14. f.close()
  15.  
  16. data = open("Usernames.txt", 'r')
  17. f =data.readlines()
  18. data = f[len(f)-1]
  19. print ("Your username is:",data[0:-1])
  20. print()
  21.  
  22. answer_1 =name[0:3]+age
  23.  
  24. answer_2 =input("Please create your password:")
  25. file= open('Passwords.txt', 'w')
  26. file.write(answer_2 + "n")
  27. file.close()
  28.  
  29. pass_1 = open("Passwords.txt", 'r')
  30. file =pass_1.readlines()
  31. pass_1= file[len(file)-1]
  32. print ("This is your Password:" ""+ pass_1[0:-1])
  33.  
  34. print()
  35. print("Login Now")
  36.  
  37. getin_1 = input("Enter your Username: ")
  38. getin_2 = input("Enter your password: ")
  39.  
  40. while getin_1 != answer_1 or getin_2 != answer_2:
  41. print("Incorrect")
  42. print("Please proceed")
  43. getin_1 = input("Enter your Username: ")
  44. getin_2 = input("Enter your password: ")
  45.  
  46. print()
  47.  
  48. print("Successfully loged in as:" " "+answer_1)
Add Comment
Please, Sign In to add comment