Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson13-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
ced73ca5
authored
4 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
5ec53ebb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
aa.py
diy.py
aa.py
0 → 100644
View file @
ced73ca5
# import random
# a="孙悟空喜欢诺依"
# b="是打发斯蒂芬十大垃圾分类sad间房"
# c=""
# for i in a:
# e=random.choice(b)
# f=random.choice(b)
# g=i+e+f
# c=c+g
# print(c)
a
=
int
(
input
(
"输入数:"
))
sum
=
0
for
i
in
range
(
1
,
a
+
1
):
This diff is collapsed.
Click to expand it.
diy.py
View file @
ced73ca5
with
open
(
r'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt'
,
'r'
,
encoding
=
'utf-8'
)
as
kk
:
a
=
kk
.
readlines
()
print
(
a
)
for
i
in
a
:
b
=
i
.
split
()
sum
=
0
for
c
in
b
[
1
:]:
sum
=
sum
+
int
(
c
)
print
(
sum
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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