Commit 4ead371b by BellCodeEditor

auto save

parent 05e7d622
import func
import turtle
data=func.new_inout()
score,a=func.sum(data)
print(score,a)
def new_inout():
total = []
while True:
u=input("请输入:")
if u=="q":
break
else:
try:
a=int(u)
except:
print("请输入数字")
else:
total.append(a)
return total
def sum(money):
cound=0
for i in money:
cound=cound+i
c=cound/len(money)
return cound,c
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