Commit bc32158a by BellCodeEditor

save project

parent 51ec42da
Showing with 18 additions and 0 deletions
a={"苹果":4,"草莓":26,"橘子":15,"山竹":30,"西瓜":50} a={"苹果":4,"草莓":26,"橘子":15,"山竹":30,"西瓜":50}
b=input("水果?")
c=int(input("价格?"))
if b in a:
if c>a[b]:
print("涨价了我们不买了")
elif c==a[b]:
print("价格不变")
else:
print("水果降价,价格是"+str(c))
else:
print("水果不在列表中")
a[b]=c
print(a)
\ 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