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
db468e58
authored
Nov 08, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
17948955
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
__pycache__/func.cpython-37.pyc
demo.py
func.py
__pycache__/func.cpython-37.pyc
View file @
db468e58
No preview for this file type
demo.py
View file @
db468e58
import
func
a
=
func
.
totol
c
=
b
(
a
)
a
=
func
.
totol
()
c
=
func
.
b
(
)
print
(
"您总共消费"
,
c
,
"元"
)
\ No newline at end of file
func.py
View file @
db468e58
...
...
@@ -13,11 +13,11 @@ def totol():
total
.
append
(
unit
)
#print(total)
return
total
def
b
(
c
):
def
b
(
s
):
sum
=
0
for
i
in
c
:
for
i
in
s
:
sum
=
sum
+
i
return
sum
#a=totol()
#c=b(a)
#print("总和是",c)
\ No newline at end of file
a
=
totol
()
c
=
b
(
a
)
print
(
"总和是"
,
c
)
\ 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