# 悦创奶茶店开业大吉

AI悦创原创Python 合集Python 合集大约 7 分钟...约 2174 字

## # 前言

pip install TuringRobots

from TuringRobots import TuringRobots

times = 1
print('你好，我是聊天机器人-小悦。\n有人说我有10岁人类的智商，你想试试吗？\n我可以回答你3个问题，来吧。')
while True:
userinput = input('第{}个问题：'.format(times))
print('小悦：' + TuringRobots(userinput, over_print=False)[1])
if userinput == '再见' or times >= 3:
print('小悦：我要走了，祝你学得快乐，再见！')
break
times += 1

Process finished with exit code 0

## # 第三大武器：课后作业

“小悦奶茶馆今天正式开张了，欢迎喜爱奶茶的你，赏光大驾，小悦将竭诚为您服务！”

print(40 * "*")
print("""欢迎光临小悦奶茶馆！\n小悦奶茶馆售卖宇宙无敌奶茶！\n奶茶虽好，可不要贪杯哦！\n每一次限尝一种口味：\n1. 原味冰奶茶 3元\n2. 香蕉冰奶茶 5元\n3. 草莓冰奶茶 5元\n4. 蒟蒻冰奶茶 7元\n5. 珍珠冰奶茶 7元""")
print(40 * "*")
milk_tea_no = input("请选择购买奶茶的编号 1/2/3/4/5:")
sum_money = 0
if int(milk_tea_no) <= 5 and int(milk_tea_no) >= 1:
milk_tea_amount = int(input("请输入您要购买的数量(整数哦):"))
if milk_tea_no == "1":
sum_money = milk_tea_amount * 3
print(f"您购买的是{milk_tea_no}号奶茶, 共购买{milk_tea_amount}杯，总计{sum_money}")
elif milk_tea_no == "2":
sum_money = milk_tea_amount * 5
print(f"您购买的是{milk_tea_no}号奶茶, 共购买{milk_tea_amount}杯，总计{sum_money}")
elif milk_tea_no == "3":
sum_money = milk_tea_amount * 5
print(f"您购买的是{milk_tea_no}号奶茶, 共购买{milk_tea_amount}杯，总计{sum_money}")
elif milk_tea_no == "4":
sum_money = milk_tea_amount * 7
print(f"您购买的是{milk_tea_no}号奶茶, 共购买{milk_tea_amount}杯，总计{sum_money}")
else:
sum_money = milk_tea_amount * 7
print(f"您购买的是{milk_tea_no}号奶茶, 共购买{milk_tea_amount}杯，总计{sum_money}")
vip = input("您是小悦奶茶馆的会员吗(y/n)?").lower()
if vip == "y":
print(f"您可以享受会员价，折后总价: {sum_money * 0.9}元")
else:
print(f"很抱歉，你只能按原价{sum_money}元，购买。")
print('****************************************')
print('做一枚有态度、有思想的奶茶馆（傲娇脸）！\n\t祝您今日购物愉快！\n\t\t诚挚欢迎您再次光临！')
print('****************************************')

• 0
• 0
• 0
• 0
• 0
• 0

• 按正序
• 按倒序
• 按热度