Commit 44b1c26d by BellCodeEditor

save project

parent e2936397
total = [] def nm():
while True: total = []
unit= input("请输入:") while True:
if unit== 'q': unit=input("请输入成绩:")
break if unit== 'q':
else: break
total.append(unit) else:
print(total) try:
\ No newline at end of file total.append(int(unit))
except:
print("滚")
finally:
print("*"*30)
print(total)
return total
def sum(mn):
sm=0
for i in mn:
sm=sm+i
return sm
import func
totl=func.nm()
retur = func.sum(totl)
print("你的总成绩是",retur,"米")
\ 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