Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_4
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
2cd30643
authored
Mar 22, 2025
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
522a910b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
25 deletions
__pycache__/func.cpython-37.pyc
func.py
swim.py
吴易阳.py
__pycache__/func.cpython-37.pyc
0 → 100644
View file @
2cd30643
File added
func.py
View file @
2cd30643
def
new_input
():
def
new_input
():
total
=
[]
total
=
[]
while
True
:
while
True
:
unit
=
int
(
input
(
"请输入:"
))
unit
=
int
(
input
(
"请输入:"
))
if
unit
==
'q'
:
if
unit
==
'q'
:
break
break
else
:
try
:
unit
=
int
(
unit
)
except
:
print
(
'重来!!!!'
)
else
:
else
:
try
:
total
.
append
(
unit
)
unit
=
int
(
unit
)
finally
:
except
:
print
(
'-'
*
30
)
print
(
'重来!!!!'
)
return
total
#print(total)
else
:
def
total
.
append
(
unit
)
finally
:
print
(
'-'
*
30
)
print
(
total
)
new_input
()
new_input
()
\ No newline at end of file
swim.py
0 → 100644
View file @
2cd30643
import
func
吴易阳.py
View file @
2cd30643
x
=
[
1
,
2
,
3
,
4
,
5
]
++ "b/\345\220\264\346\230\223\351\230\263.py"
x
=
[
1
,
2
,
3
,
4
,
5
]
def
sum
(
x
):
count
=
6
for
i
in
x
:
count
=
count
+
i
return
count
ex
=
sum
(
x
)
print
(
ex
)
\ 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