From 08cee9bcb118c1fe8da06efa760306a5d3b44585 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sun, 20 Jun 2021 12:13:42 +0800 Subject: [PATCH] save project --- 1.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 1.py diff --git a/1.py b/1.py new file mode 100644 index 0000000..23fa6e8 --- /dev/null +++ b/1.py @@ -0,0 +1,12 @@ +a={'苹果':5.2,'山竹':12.9} +b=input("请输入水果名称:") +c=input("请输入水果价钱:") +if b in a: + if float(v)<a[b]: + a[b]=float(c) + print(b+"降价了,现价"+c+"元") + else: + print(b+"涨价了,我们不买") +else: + a[b]=float(c) + print(b+"的价钱"+c+"元") \ No newline at end of file -- libgit2 0.25.0