diff --git a/asd.py b/asd.py new file mode 100644 index 0000000..6045be4 --- /dev/null +++ b/asd.py @@ -0,0 +1,17 @@ +furit={"西瓜":10,"草莓":10} +while True: + k=input("水果?") + v=input("价格?") + if k in furit: + if int(v)>furit[k]: + print("涨价") + furit[k]=int(v) + elif int(v)<furit[k]: + print("掉价") + furit[k]=int(v) + elif int(v)==furit[k]: + print("平价") + furit[k]=int(v) + else: + print("首次") + furit[k]=int(v) \ No newline at end of file