Commit 48f78b04 by BellCodeEditor

auto save

parent 6fef545c
Showing with 16 additions and 3 deletions
score={'小明':77,'小王':66,'小李':55,'小美':100}
k=input('你叫什么')
v=input('你的成绩多少')
while True:
if k in score:
if int(v)>score[k]:
score[k]=int(v)
print('成绩更新')
else:
print('成绩不足')
else:
score[k]=int(v)
print(score)
......@@ -2,7 +2,7 @@
dict= {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6}
j=input("你要买什么?")
if j in dict:
prink('巧克力'(dict[j]))
print('购买的商品'+j+'需要'+str(dict[j])+'元')
else:
prink()
\ No newline at end of file
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