Commit 2c2462de by BellCodeEditor

save project

parent 54f67f49
Showing with 16 additions and 0 deletions
cost={'苹果':5.2,'山竹':12.9,'香蕉':2.4,'荔枝':15,'葡萄':9.2}
while True:
k=input('买社么')
if k=="看":
print(cost)
v=input("钱")
if k in cost:
if float(v)< cost[k]:
cost[k]=float(v)
print(k+"嘎嘎便宜,"+v+"元")
else:
print(k+"嘎嘎贵,滚")
else:
cost[k]=float(v)
print(k+"上了"+v+"元")
\ 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