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
538e2d29
authored
Jul 06, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
6295fdde
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
__pycache__/func.cpython-37.pyc
func.py
xxx.py
__pycache__/func.cpython-37.pyc
0 → 100644
View file @
538e2d29
File added
func.py
View file @
538e2d29
def
ac
():
# 负责统计价格
def
ac
():
total
=
[]
while
True
:
unit
=
input
(
"请输入:"
)
...
...
@@ -12,5 +13,17 @@ def ac():
continue
else
:
total
.
append
(
unit
)
print
(
total
)
ac
()
# print(total)
return
total
# 计算价格
def
sums
(
money
):
# 形式参数money
count
=
0
for
i
in
money
:
count
+=
i
return
count
# 函数调用
# a = ac()
# b = sums(a) # 实际参数 a (来自统计价格的列表)
# print(b)
xxx.py
0 → 100644
View file @
538e2d29
import
func
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