Commit 83c36afe by BellCodeEditor

auto save

parent 0b8a08d3
Showing with 25 additions and 12 deletions
name=input(XX)
\ No newline at end of file
total=[] def a_input():
while True: total=[]
unit=input("请输入:") while True:
if unit=='q': unit=input("请输入:")
break if unit=='q':
else: break
try:
unit=int(unit)
except:
input("重新输入")
else: else:
total.append(unit) try:
print(total) unit=int(unit)
except:
input("重新输入")
else:
total.append(unit)
print(total)
return total
def sum(money):
count=0
for i in money:
count=count+i
return count
price=sum_input()
pay=sum(price)
result=a_input()
print(result)
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