Commit 59768d06 by BellCodeEditor

save project

parent 05e7d622
wda = []
def QWQ(s):
c=0
for i in s:
c=c+i
return c
def _():
total = []
while True:
unit= input("请输入分数:")
if unit== 'q':
break
try:
a=int(unit)
total.append(a)
except:
print("请输入数字")
continue
return total
# for i in range(2):
# wda.append(QWQ(_()))
# print(wda)
\ No newline at end of file
import func
print("总分是"+str(func.QWQ(func._()))+"分")
\ 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