From d5e5b797c3f79b1e8bce4828f2d4417884d00590 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Fri, 25 Aug 2023 09:17:50 +0800 Subject: [PATCH] auto save --- 7254175487684182.py | 8 ++++++++ func.py | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 7254175487684182.py create mode 100644 func.py diff --git a/7254175487684182.py b/7254175487684182.py new file mode 100644 index 0000000..6ecee5b --- /dev/null +++ b/7254175487684182.py @@ -0,0 +1,8 @@ +try: + age = int(input("shuoshu")) +except: + print("zhengshu") +else: + if age < 18: + print("bujiu") +print("jieshu") \ No newline at end of file diff --git a/func.py b/func.py new file mode 100644 index 0000000..ff1e402 --- /dev/null +++ b/func.py @@ -0,0 +1,22 @@ +def new_input(b): + a=0 + return b + total=[] + while True: + unit = input("请输入:") + if unit == 'q': + break + else: + try: + unit = int(unit) + except: + print("错误") + else: + total.append(unit) + print('-'*30) + for i in unit: + a+=i + b=a + return total +i=new_input() +print(i) \ No newline at end of file -- libgit2 0.25.0