Commit 83f56d66 by BellCodeEditor

auto save

parent a5231a03
Showing with 21 additions and 14 deletions
total = [] def new_input():
while True: total = []
unit= input("请输入:") while True:
if unit== 'q': unit= input("请输入:")
break if unit== 'q':
else: break
try: else:
money = int(money) try:
except: unit = int(unit)
print("udhbehbhetuhwi") except:
else: print("udhbehbhetuhwi")
total.append(unit) else:
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