Commit 3fc780a5 by BellCodeEditor

auto save

parent 582f9be5
import func1
func1.new_input()
\ No newline at end of file
# import func2
# print('总分是:' + str(func2.new_input()))
def new_input():
total = []
sum1 = 0
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit = int(unit)
except:
print('要输入整数哦~~~~~~~~')
else:
total.append(unit)
finally:
print('~·~'*10)
for i in total:
sum1 += i
return sum1
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