Commit 4db2628d by BellCodeEditor

save project

parent 799c98e3
Showing with 12 additions and 0 deletions
sg={'苹果':10,'荔枝':12,'葡萄':6}
a=input("品名:")
b=input("输入价格:")
if a in sg:
if float(b)>=sg[a]:
print("涨价了,我们不买!")
else:
print("水果降价了,可以买了!")
else:
sg[a]=float(b)
print(sg)
\ 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