From d886ac75f99f4770e32f0f6c13da289005f5e0d5 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 23 Mar 2024 09:52:56 +0800 Subject: [PATCH] save project --- func.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 func.py diff --git a/func.py b/func.py new file mode 100644 index 0000000..611f9ad --- /dev/null +++ b/func.py @@ -0,0 +1,20 @@ +def func(): + total = [] + while True: + unit= input("请输入:") + if unit == "q": + break + else: + try: + unit = int(unit) + except: + print("请重新输入一个整数") + else: + total.append(unit) + count = 0 + return total +def sum(money): + count = 0 + for i in money: + count=count+i +print() \ No newline at end of file -- libgit2 0.25.0