Commit 83f56d66 by BellCodeEditor

auto save

parent a5231a03
Showing with 12 additions and 5 deletions
total = [] def new_input():
while True: total = []
while True:
unit= input("请输入:") unit= input("请输入:")
if unit== 'q': if unit== 'q':
break break
else: else:
try: try:
money = int(money) unit = int(unit)
except: except:
print("udhbehbhetuhwi") print("udhbehbhetuhwi")
else: else:
total.append(unit) total.append(unit)
return total return total
def sum(list):
count=0
for i in list:
count=count+i
return count
a = new_input() a = new_input()
print(a) b=sum(a)
\ No newline at end of file print(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