Commit a581c0fc by BellCodeEditor

save project

parent 707fd6c9
Showing with 14 additions and 0 deletions
fruit = {"watermalon":3,"apple":5}
k = input("Please input a fruit of you want")
v = int(input("Please input how much the fruit now"))
if k in fruit:
if v > fruit[k]:
print("That more"+v-fruit[k]+"dollars")
fruit[k] = v
elif v < fruit[k]:
print("That less"+fruit[k]-v+"dollars")
fruit[k] = v
else:
print("New thing there're not")
fruit[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