Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_3
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
30b931bd
authored
Jul 12, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
21c59c99
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
21 deletions
ddg.py
func.py
ddg.py
0 → 100644
View file @
30b931bd
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
func.py
View file @
30b931bd
# 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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment