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
047ef2b7
authored
Jul 15, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
8af8fdfa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
5 deletions
.py
__pycache__/func.cpython-37.pyc
fuck.py
func.py
.py
0 → 100644
View file @
047ef2b7
file1
=
open
(
r'C:\Users\Administrator\Desktop\text.txt'
,
'w'
,
encoding
=
'utf-8'
)
file1
.
write
(
'小兰:12本'
)
file1
.
close
()
\ No newline at end of file
__pycache__/func.cpython-37.pyc
0 → 100644
View file @
047ef2b7
File added
fuck.py
0 → 100644
View file @
047ef2b7
import
func
hk
=
func
.
sb
()
sc
=
func
.
sum
(
hk
)
print
(
str
(
sc
)
+
'分'
)
\ No newline at end of file
func.py
View file @
047ef2b7
...
...
@@ -8,7 +8,7 @@ def sb():
try
:
unit
=
int
(
unit
)
except
:
print
(
'输入错误'
+
'请重新输入'
)
print
(
'输入错误'
+
'
请重新输入'
)
else
:
total
.
append
(
unit
)
finally
:
...
...
@@ -17,7 +17,8 @@ def sb():
def
sum
(
money
):
count
=
0
for
i
in
money
:
count
+=
i
count
=
count
+
i
return
count
sb
()
sum
(
total
)
\ No newline at end of file
# price=sb()
# pay=sum(price)
# print('sb '+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