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
4be7a139
authored
Dec 19, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
c5af360b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
__pycache__/func.cpython-37.pyc
a.py
func.py
__pycache__/func.cpython-37.pyc
0 → 100644
View file @
4be7a139
File added
a.py
View file @
4be7a139
try
:
age
=
int
(
input
(
'你今年几岁了'
))
except
:
print
(
'要数'
)
print
(
'~~~~~'
)
\ No newline at end of file
import
func
data
=
func
.
er
()
ty
=
func
.
ert
(
data
)
print
(
"成绩为:"
+
str
(
ty
))
\ No newline at end of file
func.py
View file @
4be7a139
...
...
@@ -15,7 +15,7 @@ def er():
total
.
append
(
unit
)
print
(
total
)
return
total
price
=
er
()
#
price=er()
def
ert
(
price
):
sum
=
0
for
i
in
price
:
...
...
@@ -24,11 +24,11 @@ def ert(price):
print
(
"=========================================="
)
print
(
price
)
print
(
'我下面开始计算菜单的总价'
)
su
=
ert
(
price
)
print
(
'菜单的总价格为:'
+
str
(
su
))
#
print("==========================================")
#
print(price)
#
print('我下面开始计算菜单的总价')
#
su=ert(price)
#
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