Commit 292401ec by BellCodeEditor

save project

parent cfdc25ce
Showing with 5 additions and 0 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)
return j
print (unit) print (unit)
print (j)
new_input() 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