Commit 83c36afe by BellCodeEditor

auto save

parent 0b8a08d3
Showing with 16 additions and 3 deletions
name=input(XX)
\ No newline at end of file
total=[] def a_input():
while True: total=[]
while True:
unit=input("请输入:") unit=input("请输入:")
if unit=='q': if unit=='q':
break break
...@@ -10,4 +11,14 @@ while True: ...@@ -10,4 +11,14 @@ while True:
input("重新输入") input("重新输入")
else: else:
total.append(unit) total.append(unit)
print(total) 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