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
1eedc997
authored
Apr 06, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
ca20accb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
1.py
__pycache__/func.cpython-37.pyc
func.py
1.py
View file @
1eedc997
del
new_input
\ No newline at end of file
import
func
data
=
func
.
new_input
()
score
=
func
.
sum_price
(
data
)
print
(
"这名选手的总分为:"
+
str
(
score
))
\ No newline at end of file
__pycache__/func.cpython-37.pyc
0 → 100644
View file @
1eedc997
File added
func.py
View file @
1eedc997
...
...
@@ -12,12 +12,9 @@ def new_input():
else
:
total
.
append
(
n
)
return
total
total
=
new_input
()
print
(
total
)
def
sum_price
(
price_list
):
sums
=
0
for
i
in
price_list
:
sums
=
sums
+
i
return
sums
cost
=
sum_price
(
total
)
print
(
"总的价格为"
,
cost
)
\ 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