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
4c6a66a8
authored
Jan 02, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
cf552469
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
11.py
__pycache__/func.cpython-37.pyc
func.py
11.py
0 → 100644
View file @
4c6a66a8
import
func
a
=
func
.
new_input
()
b
=
func
.
sum
(
a
)
print
(
b
)
\ No newline at end of file
__pycache__/func.cpython-37.pyc
0 → 100644
View file @
4c6a66a8
File added
func.py
View file @
4c6a66a8
def
new_input
():
def
new_input
():
total
=
[]
total
=
[]
while
True
:
while
True
:
unit
=
in
t
(
input
(
"请输入:"
)
)
unit
=
in
put
(
"请输入:"
)
if
unit
==
'q'
:
if
unit
==
'q'
:
break
break
else
:
else
:
...
@@ -12,4 +11,14 @@ def new_input():
...
@@ -12,4 +11,14 @@ def new_input():
print
(
"滚"
)
print
(
"滚"
)
else
:
else
:
total
.
append
(
unit
)
total
.
append
(
unit
)
new_input
()
return
total
def
sum
(
money
):
count
=
0
for
i
in
money
:
count
+=
i
return
count
#a=new_input()
#g=sum(a)
#print(g)
\ 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