Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson10-5
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
06f78421
authored
May 28, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
c3654d52
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
3 deletions
__pycache__/func.cpython-37.pyc
diy.py
func.py
swim.py
__pycache__/func.cpython-37.pyc
0 → 100644
View file @
06f78421
File added
diy.py
View file @
06f78421
money
=
[
1
2
,
32
,
35
,
47
]
money
=
[
1
,
32
,
35
,
47
]
def
sum
(
money
):
def
sum
(
money
):
list
=
0
list
=
0
for
i
in
money
:
for
i
in
money
:
list
=
list
+
i
list
=
list
+
i
return
list
return
list
print
(
'您一共消费了'
+
str
(
money
)
+
'元'
)
print
(
'您一共消费了'
+
money
+
'元'
)
\ No newline at end of file
\ No newline at end of file
func.py
0 → 100644
View file @
06f78421
def
:
list
=
0
for
i
in
money
:
list
=
list
+
i
return
list
swim.py
0 → 100644
View file @
06f78421
import
func
data
=
func
.
new_input
()
score
=
func
.
sum
(
data
)
print
(
'这位选手的总分为:'
+
str
(
score
))
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