Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def menu():
- print("Login System")
- print("1 to login")
- print("2 to register")
- print("x to exit")
- return input("choose an option: ")
- def login():
- while True:
- answer=input("Would you like to login? ")
- if answer=="yes":
- username=input("Enter your username: ")
- password=input("Emter your password: ")
- else:
- break
- def register():
- while True:
- answer=input("Would you like to register? ")
- if answer=="yes":
- username=input("create a username: ")
- password=input("create a password: ")
- else:
- break
- while True:
- choice=menu()
- if choice=="1":
- login()
- elif choice=="2":
- register()
- elif choice=="x":
- break
- else:
- print("not a valid choice")
- def menu():
- print("Quiz selection")
- print("--------------")
- print("H for History")
- print("C for Computer science")
- print("M for Music")
- print("X to quit")
- return input("choose an option")
- def History():
- while True:
- answer=input("would you like to take the quiz in easy medium or hard level? ")
- while True:
- choice=menu()
- if choice=="H":
- History()
- elif choice=="C":
- Computer_science()
- elif choice=="M":
- Music()
- elif choice=="X":
- break
- else:
- print("not a valid option")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement