purple code to your Main Code Section (type it by hand if you get weird errors).
Add the purple code to your Main Code Section (type it by hand if you get weird errors).
It will call the object’s monitorLevels() method, which we will create in this sprint:
userInput = 99
while userInput != 0:
checkerObj.displayList()
userInput = checkerObj.displayMenu()
if(userInput == 1):
checkerObj.addLevel()
checkerObj.writeLevelsToFile() # Write levelsList to LevelsFile
elif(userInput == 2):
checkerObj.removeLevel()
checkerObj.writeLevelsToFile() # Write levelsList to LevelsFile
elif(userInput == 3):
checkerObj.removeAllLevels()
checkerObj.writeLevelsToFile() # Write levelsList to LevelsFile
elif(userInput == 4):
checkerObj.updateMenuPrice()
elif(userInput == 5):
userInput = 0 # prevent the app from continuing if the user pressed Ctrl+C to stop it
checkerObj.monitorLevels()
Step by step
Solved in 2 steps