Commit 128388fb by BellCodeEditor

save project

parent 05e7d622
Showing with 33 additions and 0 deletions
def funcname():
falses=0
total=[]
while True:
unit=input('请输入得分(q退出):')
if unit=='q':
break
else:
try:
unit=int(unit)
except:
falses+=1
print('儿砸别闹,再瞎写小心出门遭雷劈!!!')
if falses>5:
print('sm东西别瞎写了!!!')
if falses>10:
print('程序被你给玩坏了')
exit()
else:
total.append(unit)
finally:
print('*'*30)
return total
def add(l):
count=0
for i in l:
count+=i
return count
\ No newline at end of file
import func
print(func.add(func.funcname()))
print('一共'+add(funcname())+'分。')
\ 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