Commit 75417b0f by BellCodeEditor

save project

parent 83b73772
f={"苹果":3,"香蕉":3.2,"西瓜":2}
f={"苹果":3,"香蕉":3.2,"西瓜":2}
k = input("请输入水果名:")
v= input("请输入"+k+"价格:")
if k in f:
if int(v) < f[k]:
f[k]=int(v)
print("已更新")
else:
print("水果价钱比之前高")
else:
f[k]=v
print("已添加新水果价格")
\ No newline at end of file
++ "b/\346\260\264\346\236\234\344\273\267\346\240\274\346\257\224\350\276\203\345\231\250\343\200\202py"
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