Commit 924bb1ba by BellCodeEditor

save project

parent 0c42f802
Showing with 12 additions and 6 deletions
dict={'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6}
k=input("你想要买什么?")
if k in dict:
print('您想要的'+k+'需要'+str(dict[k])+'元')
name={'苹果':3,'香蕉':5,'草莓':8.8,}
k=input('水果名:')
v=input('价格:')
if k in name:
if float(v)<name[k]:
name[k]=float(v)
print('降价了,价格'+v)
else:
print('涨价了')
else:
print('抱歉,这里没有你想要的物品!')
\ No newline at end of file
name[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