Commit a4322a7f by BellCodeEditor

save project

parent 05e7d622
def suanjiage():
total = []
while True:
unit=input('请输入:')
if unit=='q':
break
else:
try:
unit=int(unit)
except:
print("重输")
else:
if not unit<0:
total.append(unit)
else:
print("别玩了")
return total
def aaa(bbb):
b = 0
for i in bbb:
b+=i
return b
##############################
# a=suanjiage()
# print(a)
# sum_list=aaa(a)
# print(sum_list)
import func
a=func.suanjiage()
b=func.aaa(a)
print("分数为"+str(b))
\ 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