ign="center">A passionate frontend developer from Bangladesh
X hunter link 🔗 https://script-bdh.herokuapp.com/ ign="center">A passionate frontend developer from Bangladesh
[X hunter link] (https://script-bdh.herokuapp.com/)
menu_options = { 1: 'Option 1', 2: 'Option 2', 3: 'Option 3', 4: 'Exit', }
def print_menu(): for key in menu_options.keys(): print (key, '--', menu_options[key] )
def option1(): print('Handle option 'Option 1'')
def option2(): print('Handle option 'Option 2'')
def option3(): print('Handle option 'Option 3'')
if name=='main': while(True): print_menu() option = '' try: option = int(input('Enter your choice: ')) except: print('Wrong input. Please enter a number ...') #Check what choice was entered and act accordingly if option == 1: option1() elif option == 2: option2() elif option == 3: option3() elif option == 4: print('Thanks message before exiting') exit() else: print('Invalid option. Please enter a number between 1 and 4.'):