Commit 7339f3dc by BellCodeEditor

save project

parent 8c623bfc
Showing with 23 additions and 996 deletions
......@@ -7,998 +7,4 @@ if '猴一' in dict_hero:
print('yes')
else:
print('no')
print(dict_hero)
print(s)
print(dict_hero)
\ No newline at end of file
qp={'小明':82,'小王':86,'小张':58,'小美':100,'丁一':42}
xm=input('请输入您的姓名:')
cj=input('请输入你的最新成绩:')
if xm in qp:
if int(cj)>qp[xm]:
print('亲爱的'+xm+'同学,恭喜您~成绩已更新为'+cj+'分!')
else:
print('亲爱的'+xm+'同学,遗憾的通知您,成绩未被刷新。')
else:
qp[xm]=int(cj)
print('亲爱的'+xm+'同学,您的第一次成绩'+cj+'已上传')
\ No newline at end of file
sbhbd={'汉杯儿杯儿':5,'老八小汉杯儿':90,'奥利给小饼干':100,'利奥利':1,'汪仔牛奶糖':0.1,'老八':10000}
v=input('您要买什么')
if v in sbhbd:
print('叮咚~您的'+v+'需要支付'+str(sbhbd[v])+'元')
else:
print('您要的商品已经卖完')
\ No newline at end of file
# 直接运行以下代码,说说你的发现:
list_hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98]
dict_hero = {'赵一':30,'丁二':37,'孙五':52,'王猛':89,'周亮':98}
dict_hero =
print(len(list_hero))
print(len(dict_hero))
\ 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