Commit ffc9b09d by BellCodeEditor

save project

parent a9ed7f10
Showing with 7 additions and 5 deletions
# 直接运行以下代码,说说你的发现:
list_hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98]
dict_hero = {'赵一':30,'丁二':37,'孙五':52,'王猛':89,'周亮':98}
print(len(list_hero))
print(len(dict_hero))
\ No newline at end of file
dftd={'可口可乐':5,'百事可乐':5,'德芙巧克力':3,'康师傅红烧牛肉面':5}
k=input("你想买什么")
if k in dftd:
print("您的"+k+"价格是"+str(dftd[k])+",请支付")
else:
print("抱歉,您的"+k+"我们这里缺货")
\ 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