Commit 1532c87c by BellCodeEditor

save project

parent e62dc82a
Showing with 29 additions and 0 deletions
def new_input():
total=[]
while True:
data=input("请输入价格")
if data=="q":
break
else:
try:
data1=int(data)
except:
print("请输入数字")
else:
total.append(data1)
print(total)
return total
a=new_input()
print(a)
#
def count(list):
a=0
for i in list:
a=a+i
print(a)
return a
result2=count(result1)
print(result2)
++ "b/\346\234\211\343\200\202py"
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