Commit 63cf08d6 by BellCodeEditor

save project

parent a739410b
Showing with 43 additions and 16 deletions
def new_aa():
jiage=[]
while True:
wenti = input("请输入价格,(按q退出)")
if wenti == "q":
break
try:
a = int(wenti)
except:
print("请重新输入一个数字")
else
jiage.append(a)
finally:
print("_"*30)
print(jiage)
new_aa()
def b():
a=[]
while True:
c=input('请输入价格("按q退出")')
if c == "q":
break
else:
try:
h=int(c)
except:
print("请重新输入一个数字")
else:
a.append(h)
finally:
print("="*30)
return a
def r(t):
u=0
for i in t:
u=u+i
return u
j=b()
k=r(j)
#print("你一共消费了"+str(k)+"元")
import func
data = n
\ 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