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
dba161b0
authored
Aug 06, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
6d88eca4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
0 deletions
dily.py
dily1.py
dily3.py
func.py
dily.py
0 → 100644
View file @
dba161b0
def
add
(
x
,
y
):
z
=
x
+
y
print
(
"z的值为:"
,
z
)
#return z
\ No newline at end of file
dily1.py
0 → 100644
View file @
dba161b0
total
=
[]
while
True
:
unit
=
input
(
"请输入: "
)
if
unit
==
'q'
:
break
else
:
total
.
append
(
unit
)
print
(
total
)
\ No newline at end of file
dily3.py
0 → 100644
View file @
dba161b0
def
new
(
list
):
total
=
0
for
i
in
list
:
total
=
total
+
i
print
(
total
)
return
(
total
)
f
=
new
(
list
=
[
345676545654565456545445434567898765
,
1234567890345676545676554321234567890
])
print
(
f
)
func.py
0 → 100644
View file @
dba161b0
z
=
[]
while
True
:
a
=
int
(
input
(
"输入价格"
))
if
a
==
"stop"
:
break
else
:
try
:
a1
=
int
(
a
)
except
:
print
(
"输入数字"
)
else
:
z
.
append
(
a1
)
print
(
z
)
new
()
\ No newline at end of file
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