Commit ceba29d3 by BellCodeEditor

auto save

parent 472a6f42
Showing with 3 additions and 12 deletions
def eds123():
total = []
total = []
while True:
unit=input("请输入:")
if unit== 'q':
......@@ -10,15 +10,6 @@ def eds123():
except:
print("请输入一个数字")
return total
def sum(list1):
sum=0
for i in list1:
sum=sum+i
return sum
list1=eds123()
s=sum(list1)
print("共消费了:"+str(s)+"元")
\ No newline at end of file
print(list1)
\ 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