Commit 04a608e8 by BellCodeEditor

save project

parent dc70412a
Showing with 41 additions and 0 deletions
price=[14,17,24,29]
sss=0
for i in price:
# print(i)
sss+=i
print(sss)
\ No newline at end of file
def zxw():
toro = []
while True:
yys=input("给我说出价格(q退出)")
if yys == "q":
break
else:
try:
yys=int(yys)
except:
print("输入整数")
else:
toro.append(yys)
finally:
print("——"*30)
sbzxw=0
for i in toro:
print(i)
sbzxw+=i
return sbzxw
pdd = zxw()
print(pdd)
try:
age = int(input('你今年几岁了'))
except:
print('要输入整数')
else:
if age < 18:
print('不可以喝酒,要是喝了打死你')
print('程序结束~~')
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