Commit 44b1c26d by BellCodeEditor

save project

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