Commit e5eed142 by BellCodeEditor

save project

parent 37a31d62
Showing with 12 additions and 8 deletions
i = {'q':1,'W':2,'e':3,'r':4,'t':5,'y':6}
print(i)
print(i['e'])
i['e'] = 5
print(i)
\ No newline at end of file
q = {'辣条':3,'薯片':6,'烤肠':5,'鸡腿':8,'卤蛋':2,'橙汁':9,'酸奶':7}
k = input("请问您要买什么东西?")
v = input("请输入物品价格")
if k in q:
if int(v)<q[k]:
q[k] = int(v)
print(k+'降价了,现在'+v+'元')
else:
print(k+'涨价了')
else:
q[k] = int(v)
print(k+'的价钱'+v+'元已上传')
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