Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_1
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
94b77d17
authored
Sep 17, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
775bf4d4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
11.py
__pycache__/func.cpython-37.pyc
func.py
11.py
0 → 100644
View file @
94b77d17
import
func
score
=
func
.
new_input
()
number
=
func
.
sum
(
score
)
print
(
"游泳成绩一共得分:"
+
str
(
number
))
__pycache__/func.cpython-37.pyc
0 → 100644
View file @
94b77d17
File added
func.py
View file @
94b77d17
def
new_input
():
#先 封装函数
total
=
[]
while
True
:
...
...
@@ -11,9 +12,16 @@ def new_input(): #先 封装函数
print
(
"需要填入数字。"
)
else
:
total
.
append
(
unit
)
return
tatol
print
(
total
)
return
total
def
sum
(
money
):
count
=
0
for
i
in
money
:
count
=
count
+
i
return
count
#result=new_input()
#无参 #后 调用函数
result
=
new_input
()
print
(
result
)
\ No newline at end of file
#pay=sum(result)
#print("你需要支付"+str(pay)+"元。")
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