Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- loggedin = 0
- while True:
- print("Press 1 to Log in")
- print("Press 2 to logout")
- print("Press 3 to quit")
- select = input()
- if (select == "1"):
- username = input("What is your username: ")
- password = input("What is the password: ")
- if (password != "dog"):
- print("Incorrect password, ", username)
- if (password == "dog"):
- print("Welcome, ", username)
- break
- if (select == "3"):
- print("Goodbye")
- sys.exit(0)
- if (select == "2"):
- print("Sorry You aren't logged in")
- else:
- print("Incorrect key pressed!")
- while True:
- print("Welcome,", username)
- print("Press 1 to run the Instructions Per secound calculator")
- print("Press 2 to logout and quit")
- select_Loggedin = input()
- if (select_Loggedin == "1"):
- print("Welcome to the Intructions per secound calculator")
- cpu = input("what Proccessor do you have: ")
- core = int(input("how many cores does the " + cpu + " it have: "))
- ghz = float(input("How much Ghz does your " + cpu + " have: "))
- bill = int((ghz * 1000000000))
- ips = (bill * core)
- print("Your " + cpu + " can process", ips, "per secound")
- restart = input("Do you want to restart(Y/N): ")
- while (restart == "Y" or restart == "y"):
- cpu = input("what cpu do you have: ")
- core = int(input("how many cores does the " + cpu + " it have: "))
- ghz = float(input("How much Ghz does your " + cpu + " have: "))
- bill = int((ghz * 1000000000))
- ips = (bill * core)
- print("Your " + cpu + " can process", ips, "per secound")
- restart = input("Do you want to restart(Y/N): ")
- else:
- print("Goodbye")
- if (select_Loggedin == "2"):
- print("Goodbye")
- sys.exit(0)
- else:
- print("Incorrect key pressed!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement