Commit 2700c7b3 by BellCodeEditor

save project

parent 05e7d622
import func
sam=int(func.new_input(1,3))
print(sam)
\ No newline at end of file
def new_input(a,b):
total = []
while True:
try:
unit= int(input("请输入:"))
except:
print("请输入数字!")
else:
if unit== 0:
break
else:
total.append(unit)
print(total)
x=0
for i in total:
x=x+i
return a+b+x
#sam=int(new_input(1,3))
#print(sam)
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