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
5dd3f9da
authored
Nov 12, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
4531e868
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
2.PY
func.py
2.PY
0 → 100644
View file @
5dd3f9da
price
=
[
15
,
18
,
14
,
25
]
count
=
0
def
qiuhe
(
price
):
count
=
0
for
i
in
price
:
count
=
count
+
i
return
count
a
=
[
10
,
20
,
30
,
40
]
s
=
qiuhe
(
price
)
n
=
qiuhe
(
a
)
print
(
s
)
print
(
n
)
\ No newline at end of file
func.py
View file @
5dd3f9da
...
@@ -12,8 +12,9 @@ def new_input(): #定义函数new_input()
...
@@ -12,8 +12,9 @@ def new_input(): #定义函数new_input()
break
#中止循环
break
#中止循环
#print(total) #输出total列表的全部元素
#print(total) #输出total列表的全部元素
print
(
'-'
*
30
)
#输出30个下划线'_'
print
(
'-'
*
30
)
#输出30个下划线'_'
return
total
new_input
()
#调用函数new_input
t
=
new_input
()
#调用函数new_input()
print
(
t
)
...
...
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