Commit 8f255575 by BellCodeEditor

save project

parent f14e61c0
Showing with 11 additions and 1 deletions
list_hero=['赵一',30,'丁二',37] list_hero=['赵一',30,'丁二',37]
dict_hero={'赵一':30,'丁二':37} dict_hero={'赵一':30,'丁二':37}
dict_hero['赵一']=69 dict_hero['赵一']=69
dict_hero['周仨']=69 dict_hero['周三']=69
if '丁二' in dict_hero:
print(dict_hero['丁二'])
print(dict_hero) print(dict_hero)
dict= {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':3}
dict= {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':3}
j=input("你要购买什么")
if j in dict:
print("你要买的"+j+"需要支付"+str(dict[j])+"元")
else:
print("您购买的物品缺货了")
\ No newline at end of file
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