Python Chatbot - Coffee Bot

Define your functions

def coffee_bot():
print(“Welcome to the cafe!”)
def get_size():
res = input(“What size drink can I get for you? \n[a] Small \n[b] Medium \n[c] Large \n >”)
print (res)

Call coffee_bot()!

coffee_bot()
get_size()

I’m getting a NameError when I try printing res. What am I doing wrong?

I just ran your code off-platform and didn’t get a NameError. Only thing I can think of is you have a space between print and (res). I know some of the code checkers are picky. Try just print(res) and see if that works?