Commit ccac0271 by BellCodeEditor

auto save

parent 5ab88987
Showing with 26 additions and 5 deletions
score = {'语文':91,'数学':88,'英语':85}
# 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来
s1 = {'语文':91,'数学':88,'英语':85}
s2={'语文':999,'数学':999,'英语':999}
s3={'语文':666,'数学':777,'英语':888}
sb={"小男孩":s1,"大伊万":s2,"傻逼":s3}
while True:
print("请输入名字,然后按q")
m=input('姓名:')
if m in sb:
i=sb[m]
for k,v in i.items():
print(k,v)
elif m =='q':
break
else:
print('错误')
print('程序结束')
\ No newline at end of file
dict={'核弹':6754,'傻逼':875,'武士刀':354,'宫本武藏':18888,'李信':13888}
s=input("你他妈想要什么:")
b=input("你他妈要几个:")
if s in dict:
d=dict[s]*int(b)
print("好的,你的"+s+"需要支付"+str(d)+"元")
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