Commit b65c3924 by BellCodeEditor

save project

parent 08211414
Showing with 28 additions and 0 deletions
score={"苹果":5.2,"山竹":12.9,"香蕉":20.4}
k=input("请输入水果名称")
N=input("水果价格")
if k in score:
if float(N)<score[k]:
float(N)=score[k]
print(k+"降价,现价"+N+"元")
else:
print(k+"涨价了")
else:
float(N)=score[k]
print(k+"的价钱"+N+"元")
\ No newline at end of file
score={"苹果":5.2,"山竹":12.9,"香蕉":20.4}
k=input("请输入水果名称")
N=input("水果价格")
if k in score:
if float(N)<score[k]:
score[k]=float(N)
print(k+"降价,现价"+N+"元")
else:
print(k+"涨价了")
else:
score[k]=float(N)
print(k+"的价钱"+N+"元")
\ 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