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
98d03e09
authored
Jul 15, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
dfe18f9d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
30 deletions
__pycache__/func.cpython-37.pyc
func.py
sw.py
__pycache__/func.cpython-37.pyc
0 → 100644
View file @
98d03e09
File added
func.py
View file @
98d03e09
#def new_input():
def
abc
():
# total = []
total
=
[]
# while True:
while
True
:
# unit= input('请输入单价 (q键退出):')
unit
=
input
(
'请输入单价 (q键退出):'
)
# if unit=='q':
if
unit
==
'q'
:
# break
break
# else:
else
:
# try:
try
:
# unit = int(unit)
unit
=
int
(
unit
)
# except:
except
:
# print('请重新输入一个数字')
print
(
'请重新输入一个数字'
)
# else:
else
:
# total.append(unit)
total
.
append
(
unit
)
# finally:
finally
:
# print('-'*30)
print
(
'-'
*
30
)
# return total
print
(
total
)
# print(total)
return
total
#new_input()
def
mk
(
money
):
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
count
=
0
#price=[15,18,14,25]
for
i
in
money
:
#count=0
count
+=
i
#for i in price:
return
count
# count=count+i
#price=abc()
#prnit(count)
#pay=sum(price)
def
hello
(
name
):
#print("y"+str(pay)+"元")
content
=
"你好!"
+
name
return
content
result
=
hello
(
"小依"
)
import
func
print
(
result
)
price
=
abc
()
\ No newline at end of file
pay
=
sum
(
price
)
def
mk
(
money
):
count
=
0
for
i
in
money
:
count
+=
i
return
count
print
(
str
(
pay
)
+
"分"
)
\ No newline at end of file
sw.py
0 → 100644
View file @
98d03e09
import
func
price
=
abc
()
pay
=
sum
(
price
)
def
mk
(
money
):
count
=
0
for
i
in
money
:
count
+=
i
return
count
print
(
str
(
pay
)
+
"分"
)
\ 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