Commit 516730d1 by BellCodeEditor

save project

parent 2c0290ca
Showing with 24 additions and 0 deletions
def new_input():
total=[]
while true:
data=input("请输入价格")
if data=="a":
break
else:
try:
data1=int(data)
except:
print("请输入数字")
else:
total.append(data1)
return total
result=new_input()
def count(list):
a=0
for i in list:
a=a+i
print(a)
return a
result2=corunt(result1 )
print(result2)
\ 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