Commit 70ba10d1 by BellCodeEditor

save project

parent f1980af8
Showing with 21 additions and 2 deletions
# 神奇百货中的物品已经帮你创建好啦,接下来要看你的了~
dict= {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6}
\ No newline at end of file
dict= {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6}
sb=input('龟孙子,你他马要买什么')
if sb in dict:
nb=input('你要买多少个')
s=int(nb)
hb=int(dict[sb])
d=s*hb
print('这个'+str(d)+'元'+'给玩钱快滚')
a=int(input('给的钱数'))
if a>d:
c=a-d
print('找你'+str(c)+'元')
else:
if d>a:
w=d-a
print('还要'+str(w)+'元'+'快补上')
else:
print('钱刚好,'+'拿好快滚')
else:
print('滚,这里没有,给老子爬.')
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