Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_2
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
44b1c26d
authored
Jul 22, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
e2936397
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
6 deletions
__pycache__/func.cpython-37.pyc
func.py
hahaha.py
__pycache__/func.cpython-37.pyc
0 → 100644
View file @
44b1c26d
File added
func.py
View file @
44b1c26d
total
=
[]
while
True
:
unit
=
input
(
"请输入:"
)
def
nm
():
total
=
[]
while
True
:
unit
=
input
(
"请输入成绩:"
)
if
unit
==
'q'
:
break
else
:
total
.
append
(
unit
)
print
(
total
)
\ No newline at end of file
try
:
total
.
append
(
int
(
unit
))
except
:
print
(
"滚"
)
finally
:
print
(
"*"
*
30
)
print
(
total
)
return
total
def
sum
(
mn
):
sm
=
0
for
i
in
mn
:
sm
=
sm
+
i
return
sm
hahaha.py
0 → 100644
View file @
44b1c26d
import
func
totl
=
func
.
nm
()
retur
=
func
.
sum
(
totl
)
print
(
"你的总成绩是"
,
retur
,
"米"
)
\ 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