Commit 803d6c71 by BellCodeEditor

save project

parent e79f00b8
Showing with 9 additions and 3 deletions
dict_hero={'猴儿':10,'猴一':21,'猴队长','猴七':30}
'''dict_hero={'猴儿':10,'猴一':21,'猴队长':29,'猴七':30}
print(dict-hero)
#提取猴队长的臂力值
print(dict-hero['猴队长'])
......@@ -7,4 +7,10 @@ dict_hero['猴七']=32
print(dict_hero)
#猴十的臂力值是25,请补充进字典
dict_hero['猴十']=25
print(dict_hero)
\ No newline at end of file
print(dict_hero)'''
dict={'米饭':9999999999}
k=input('你要买什么?')
if k in dict:
print('叮咚你的'+k'需支付'+str(dict[k])+'元')
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