I am working on the Coffee Bot Python Project. I defined the print function above the get_size function. Then I call the print function inside the get_size function, however, the message is not printed when the program is run.
# Define your functions
def coffee_bot():
print('Welcome to the cafe!')
size = get_size()
print(size)
def print_message():
print('I\'m sorry, I did not understand your selection. Please enter the corresponding letter for your response.')
def get_size():
res = input('What size drink can I get for you? \n[a] Small \n[b] Medium \n[c] Large \n> ')
if res == 'a':
return 'small'
elif res == 'b':
return 'medium'
elif res == 'c':
return 'large'
else:
print_message()
return get_size()
# Call coffee_bot()!
coffee_bot()