def main():
myRadio = Radio()
userOption = 0
while userOption != "10":
userOption = GetMenuGetOptions()
if userOption == "1":
print(myRadio.currentStation)
elif userOption == "2":
myRadio.longPressPreset1()
elif userOption == "3":
myRadio.longPressPreset2()
elif userOption == "4":
myRadio.longPressPreset3()
elif userOption == "5":
myRadio.seekNext
print(myRadio.currentStation)
elif userOption == "6":
myRadio.shortPressPreset1()
elif userOption == "7":
myRadio.shortPressPreset2()
elif userOption == "8":
myRadio.shortPressPreset3()
elif userOption == "9":
myRadio.displayLCD()
else:
input("\nRun complete. Press the Enter key to exit.")
def GetMenuGetOptions():
print("""1 = Display tuned in station
2 = Program preset station 1
3 = Program preset station 2
4 = Program preset station 3
5 = Seek next station
6 = Tune preset station 1
7 = Tune preset station 2
8 = Tune preset station 3
9 = Dump Programming
10 = Turn off radio""")
print()
userOption = input('Enter your choice: ')
while userOption == False:
userOption = input('Enter your choice: ')
return userOption