NP34 自动售卖饮料机

思路:

step1:定义输入;打印所需语句;
step2:判断并输出对应语句;

代码如下:

kind_of_drink = input()
print('What kind of drink would you like?' )
if kind_of_drink == 'cola':
    print( 'Below is your cola. Please check it!')
else:
    print('The {} has been sold out!'.format(kind_of_drink))