Commit 63783e28 by BellCodeEditor

save project

parent 07387df4
Showing with 30 additions and 0 deletions
def abc():
total = []
while True:
unit = input('')
if unit == 'q':
break
else:
try:
unit=int(unit)
except:
print('整数!')
else:
total.append(unit)
finally:
print('-'*30)
return total
def sam(money):
a=0
for i in money:
a+=i
return a
price=abc()
pay=sum(price)
# print('消费'+str(pay)+'元')
abc()
import a
data=a.abc()
score=a.sam(abc)
print(str(score))
\ 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