Commit f77bfe6d by BellCodeEditor

save project

parent d1a37cbc
Showing with 12 additions and 10 deletions
dict={"海贝":3,"华山":5,"阿里":6,"里啊":4}
i=input('买什么')
if i in dict:
print(i+'需要支付'+str(dict[i])+"元")
else:
print('没有')
\ No newline at end of file
# 这是悟空为花果山小猴做臂力测试的程序代码
#
#for i in range(len(list_hero)):
#if i%2==1 and list_hero[i]>=power:
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
dict_hero={"sj":10,"gj":20,"hj":30,"jj":40} dict_hero={"sj":10,"gj":20,"hj":30,"jj":40}
print(dict_hero) dict_hero['ej']=40
dict_hero['jj']=100 if 'sj'in dict_hero:
print(dict_hero) print("kk")
\ No newline at end of file \ 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