Commit 25912088 by BellCodeEditor

auto save

parent dc70412a
Showing with 28 additions and 0 deletions
total = []
def new_price(a):
while True:
unit= input("请输入:")
if unit== 'q':
print("程序结束")
break
else:
try:
unit=int(unit)
a.append(unit)
except:
print("程序错误")
break
return total
w=new_price(total)
def sum(list)
b=0
for i in list():
b+=i
return list
c=sum(total)
print(c)
# print(total)
s=new_price(total)
print(s)
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