Commit 3285e0cb by BellCodeEditor

save project

parent dad49a7a
Showing with 11 additions and 6 deletions
dict={'A':3,'B':4,'C':1}
k=input('买啥?')
if k in dict:
print('你的'+k+'给'+str(dict[k])+'元')
cost={'A':5.2,'B':12.9,'C':2.4}
k=input('啥?')
v=input('钱?')
if k in cost:
if float(v)<cost[k]:
cost[k]=float(v)
print(k+"降价"+v)
else:
print(k+"涨价")
else:
print('没了')
\ No newline at end of file
cost[k]=float(v)
print(k+v)
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