Commit 44b1c26d by BellCodeEditor

save project

parent e2936397
total = [] def nm():
while True: total = []
unit= input("请输入:") while True:
unit=input("请输入成绩:")
if unit== 'q': if unit== 'q':
break break
else: else:
total.append(unit) try:
print(total) total.append(int(unit))
\ No newline at end of file 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