Commit 5d0b1d9f by BellCodeEditor

save project

parent 911572df
Showing with 7 additions and 13 deletions
...@@ -2,12 +2,4 @@ ...@@ -2,12 +2,4 @@
name=input() name=input()
power=int(input()) power=int(input())
list_hero=[] list_hero=[]
for i in range(len(list_hero)):
if i%2==1 and list_hero[i]>=power:
list_hero.insert(i-1,name)
list_hero.insert(i,power)
break
print(list_hero)
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
dict_hero=
print(dict_hero)
# 直接运行以下代码,说说你的发现: # 直接运行以下代码,说说你的发现:
bict=['赵一':30,'丁二':37,'孙五':52,'王猛'89,'周亮'98'唐三藏'100] dict={'牛肉':30,'羊肉':37,'鸡肉':52,'蛋糕':89,'200个面包':98,'全套套餐':250}
dict["孙悟空"]="齐天大圣" k=input("你要买什么")
print(bict) if k in dict:
\ No newline at end of file print("叮咚~您的"+k+"需要支付"+str(dict[k])+"元~")
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