Commit cad83223 by BellCodeEditor

save project

parent 5c6c838c
Showing with 12 additions and 18 deletions
def new_input():
total = []
total = []
def new_input():
while True:
unit=input("请输入:")
if unit == 'q':
break
else:
try:
unit=int(unit)
except:
print("输入数字")
try:
unit= input("请输入:")
if unit== 'q':
break
else:
total.append(unit)
except:
print("输入数字")
else:
print(total)
return total
def www(f):
count=0
for i in www:
count=count+i
return count
pyu=new_input()
rt=www(pyu)
print(rt)
\ No newline at end of file
print(pyu)
\ No newline at end of file
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