Commit 8908bf64 by BellCodeEditor

auto save

parent dc70412a
Showing with 27 additions and 0 deletions
price=[15,18,14,25]
def xxx(x):
a=0
for i in x:
a=a+i
print(a)
return a
xxx(price)
def new_input():
total = []
while True:
price=int( input("请输入:"))
try:
p=int(price)
except:
print('输整数')
if price== 'q':
break
else:
total.append(price)
print('-'*60)
return total
# print(total)
t=new_input()
print(t)
\ 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