Commit cad83223 by BellCodeEditor

save project

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