Commit c35cce10 by BellCodeEditor

auto save

parent 6d88eca4
def new_input():
total=[]
while True:
price=input("请输入:")
if price=='q':
break
try:
price=int(price)
except:
print("请入一个整数")
else:
total.append(price)
return total
def sum(abc):
sum=0
for i in abc:
sum+=i
print("总数是:",sum)
result=new_input()
# print(sum(result))
\ No newline at end of file
import diy4
date=diy4.new_input()
result=diy4.sum(date)
print("跳水成绩的总分是:"+result)
\ 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