Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loggedIn = False
- adminUser = "test"
- adminPass = "test"
- def newStudent():
- print("")
- def getStudent():
- print("")
- def getReports():
- print("")
- def logOut():
- print("")
- def showMenu():
- global loggedIn
- if loggedIn:
- print("\nTree Road School: "
- + "\n1: New Student"
- + "\n2: Retrieve Student Details"
- + "\n3: Reports"
- + "\n4: Logout")
- try:
- selection = int(input("\nSelection: "))
- if selection == 1:
- newStudent()
- elif selection == 2:
- getStudent()
- elif selection == 3:
- getReports()
- elif selection == 4:
- logOut()
- else:
- return print("That's not a valid number, try again.")
- except ValueError:
- return print("That's not a valid number, try again.")
- else:
- print("\nPlease login access the menu")
- username = str(input("Username: "))
- password = str(input("Password: "))
- if username == adminUser:
- if password == adminPass:
- print("Logged into '" + username + "'")
- loggedIn = True
- else:
- print("Invalid username or password")
- else:
- print("Invalid username or password")
- while True:
- showMenu()
Add Comment
Please, Sign In to add comment