Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_4
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
47fc501b
authored
Dec 19, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
326d2604
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
func.py
func.py
View file @
47fc501b
...
@@ -20,14 +20,15 @@ def ert(price):
...
@@ -20,14 +20,15 @@ def ert(price):
sum
=
0
sum
=
0
for
i
in
price
:
for
i
in
price
:
sum
+=
i
sum
+=
i
return
sum
print
(
"=========================================="
)
print
(
"=========================================="
)
print
(
price
)
print
(
price
)
print
(
'我下面开始计算菜单的总价'
)
print
(
'我下面开始计算菜单的总价'
)
su
m
=
ert
(
price
)
su
=
ert
(
price
)
print
(
'菜单的总价格为:'
+
str
(
ert
))
print
(
'菜单的总价格为:'
+
str
(
su
))
# '''
# '''
# 思路:
# 思路:
# 遍历得到列表中的每个值,然后让他们相加
# 遍历得到列表中的每个值,然后让他们相加
...
...
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