Commit 2df64ca3 by BellCodeEditor

save project

parent 1ed81e92
Showing with 8 additions and 4 deletions
......@@ -2,16 +2,16 @@ def new_input():
total = []
while True:
unit= input("请输入:")
if break== 'q':
if unit== 'q':
break
else:
try:
break=int(break)
unit=int(unit)
except:
print("请输入一个数字")
else:
total.append(break)
rinally:
total.append(unit)
finally:
print("-"*30)
return total
......
import func
data=func.new_input()
score = func.sum(data)
print("这位选手的总分数为:"+str(score))
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