Commit ed57340c by BellCodeEditor

save project

parent 65094279
Showing with 10 additions and 7 deletions
......@@ -11,10 +11,13 @@
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
# dict_shop={"马":30,"牛":20,"鸡":5,"鱼":10}
# print(dict_shop)
dict_monkeys={'猴三':10,'猴一':21,'猴五':22,'猴队长':29,'猴七':30}
print(monkeys['猴队长'])
dict_monkeys['猴七']=32
print(dict_monkeys)
if '猴十' not in dict_monkeys:
dict_monkeys['猴十']=25
print(dict_monkeys)
dict_robotshop={'老八的shit':35,'巴西草肉':30,'小鸟伏特加':3000000000000,'毛主席茅台':100000000000000000}
print(dict_robotshop)
while True:
shop=input("欢迎光临,请问你需要什么?")
if shop in dict_robotshop:
many=int(input("How many do you want?"))
money=many*dict_robotshop[shop]
print("您购买的"+str(many)+"个"+shop+"一共需要"+str(money)+"元~")
else:
print("抱歉,暂时缺货哦,亲~")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment