Commit 30b931bd by BellCodeEditor

save project

parent 21c59c99
Showing with 28 additions and 21 deletions
def add():
x = 5
y = 9
print("执行return之前")
return x
print("执行return之后")
z = x + y
result = add()
print(result)
\ No newline at end of file
# def zxw():
# total = []
# while True:
# unit= input("请输入:")
# if unit== 'q':
# break
# else:
# total.append(unit)
# print(total)
# zxw()
try:
zxwsb = int(input("请输入价格!!!"))
except:
print("必须要输入整数!")
else:
if zxwsb < 20:
print("必须要吃屎哦,不吃干你!")
print("程序被你打死了")
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)
return toro
pdd = zxw()
print(pdd)
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