Commit 6d8dc2a1 by BellCodeEditor

auto save

parent 05e7d622
Showing with 40 additions and 0 deletions
\ 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)
zxc(toro)
def zxc(asd):
qwe=0
for i in asd:
qwe+=i
print(qwe)
return qwe
zxw()
# print("13s",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