Guest User

Untitled

a guest
Mar 18th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. def homeScreenArt():
  2. print("-*----------*------------*------*------*-")
  3. print("-----*-------------*--------------*------")
  4. print("-----&&&&&--&&--&&----&&----&&&&&--------")
  5. print("-*--&&---&&---&&--&&-*--&&---*--&----*---")
  6. print("-----&&&--&&----&&--&&----&&----&--------")
  7. print("-------&&&&&&-*----&&&&--*--&&--&&&&&----")
  8. print("----*-------&&--------*----------*-----*-")
  9. print("-------------&&--&--------*--------------")
  10. print("--*------------&-&--*--------*-------*---")
  11. print("----------*-----&-------Jack-Carter-2018-")
  12. print("-----*------------*--------------*-------n")
  13. def createLogin():
  14. criteriaMet=0
  15. print("n"*60,"-NEW USER-n")
  16. firstname=input("input your first name: ")
  17. age=input("input your age: ")
  18. #returns error message when a name with len < 3 is entered
  19. username=(firstname[0]+firstname[1]+firstname[2]+age)
  20. print("your username is",username)
  21. while criteriaMet<1:
  22. passEntered = input("input a password at least 7 characters long: ")
  23. if (len(passEntered))<7:
  24. print("password entered is",7-(len(passEntered))," characters to short")
  25. passEntered=input("input a password at least 7 characters long: ")
  26. print("password entered is",7-(len(passEntered))," characters to short")
  27. else:
  28. criteriaMet=+1
  29. criteriaMet2=0
  30. textFile=open(username, "w+")
  31. textFile.write("username:n")
  32. textFile.write(username)
  33. textFile.write("npassword:n")
  34. textFile.write(passEntered)
  35. print("user details have been saved to '",username,"'")
  36. while criteriaMet2<1:
  37. showCreds=input("Display user credentials? [y/n]")
  38. if showCreds=="y":
  39. criteriaMet2=+1
  40. print(textFile.read())
  41. textFile.close()
  42. print("if functional")
  43. elif showCreds=="n":
  44. criteriaMet2=+1
  45. #quizMenu()
  46. print("elif functional")
  47. else:
  48. print("Input invalid")
  49. print("else functional")
  50. def menu1():
  51. selection1=input("n1.Loginn2.New usernnnnnnn>>> ")
  52. if selection1=="1":
  53. login()
  54. elif selection1=="2":
  55. createLogin()
  56. else:
  57. print("ninvalid command")
  58. menu1()
  59. homeScreenArt()
  60. menu1()
Add Comment
Please, Sign In to add comment