Commit 292401ec by BellCodeEditor

save project

parent cfdc25ce
Showing with 7 additions and 3 deletions
def new_input(): def new_input():
total = [] total = []
unit = 0 unit = 0
j=0
while True: while True:
unit = input("请输入数字:(输入q退出)") unit = input("请输入数字:(输入q退出)")
try: try:
...@@ -11,5 +12,9 @@ def new_input(): ...@@ -11,5 +12,9 @@ def new_input():
print("不是整数,给我输入整数!") print("不是整数,给我输入整数!")
else: else:
total.append(a) total.append(a)
print (unit) return j
new_input() print (unit)
\ No newline at end of file print (j)
new_input()
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