Advertisement
Guest User

Untitled

a guest
Nov 8th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. import sys
  2. loggedin = 0
  3.  
  4. while True:
  5. print("Press 1 to Log in")
  6. print("Press 2 to logout")
  7. print("Press 3 to quit")
  8.  
  9. select = input()
  10. if (select == "1"):
  11. username = input("What is your username: ")
  12. password = input("What is the password: ")
  13.  
  14. if (password != "dog"):
  15. print("Incorrect password, ", username)
  16.  
  17. if (password == "dog"):
  18. print("Welcome, ", username)
  19. break
  20. if (select == "3"):
  21. print("Goodbye")
  22. sys.exit(0)
  23.  
  24. if (select == "2"):
  25. print("Sorry You aren't logged in")
  26. else:
  27. print("Incorrect key pressed!")
  28.  
  29. while True:
  30. print("Welcome,", username)
  31. print("Press 1 to run the Instructions Per secound calculator")
  32. print("Press 2 to logout and quit")
  33. select_Loggedin = input()
  34. if (select_Loggedin == "1"):
  35. print("Welcome to the Intructions per secound calculator")
  36. cpu = input("what Proccessor do you have: ")
  37. core = int(input("how many cores does the " + cpu + " it have: "))
  38. ghz = float(input("How much Ghz does your " + cpu + " have: "))
  39.  
  40. bill = int((ghz * 1000000000))
  41.  
  42. ips = (bill * core)
  43.  
  44. print("Your " + cpu + " can process", ips, "per secound")
  45.  
  46. restart = input("Do you want to restart(Y/N): ")
  47.  
  48. while (restart == "Y" or restart == "y"):
  49. cpu = input("what cpu do you have: ")
  50. core = int(input("how many cores does the " + cpu + " it have: "))
  51. ghz = float(input("How much Ghz does your " + cpu + " have: "))
  52.  
  53. bill = int((ghz * 1000000000))
  54.  
  55. ips = (bill * core)
  56.  
  57. print("Your " + cpu + " can process", ips, "per secound")
  58.  
  59. restart = input("Do you want to restart(Y/N): ")
  60.  
  61.  
  62. else:
  63. print("Goodbye")
  64. if (select_Loggedin == "2"):
  65. print("Goodbye")
  66. sys.exit(0)
  67.  
  68. else:
  69. print("Incorrect key pressed!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement