Commit a8507436 by BellCodeEditor

auto save

parent 05e7d622
Showing with 40 additions and 0 deletions
toto=[]
def new_input():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("请输入数字")
else:
total.append(unit)
print(total)
return total
toto=new_input()
print(toto)
b=0
def sum()
a=0
for i in toto:
a=a+i
return a
b=sum()
print(b)
\ No newline at end of file
import gfh
gfh.new_input()
gfh.sum()
print("这位选手的总分为"+c)
\ 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