Commit 707013f1 by BellCodeEditor

save project

parent 7723e7a0
Showing with 14 additions and 0 deletions
dict={'苹果':10,'雪梨':12,'香蕉':15}
while True:
k=input("请输入水果名称:")
n=input("请输入价格:")
if k in dict:
if int(n)<dict[k]:
print('降价了')
if int(n)>dict[k]:
print('涨价了')
if int(n)==dict[k]:
print('原价')
else:
dict[k]=int(n)
\ 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