Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson12-2
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
9c94203b
authored
Dec 12, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
05a4b33a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
50 deletions
diy.2py
diy.py
diy3.py
ewatgwrjkhgq3;t.py
trgi.py
diy.2py
View file @
9c94203b
with open(r)
\ No newline at end of file
diy.py
View file @
9c94203b
for
i
in
range
(
2000
,
3201
):
if
i
%
7
==
0
and
i
%
5
!=
0
:
print
(
i
)
\ No newline at end of file
diy3.py
View file @
9c94203b
import
turtle
import
turtle
pen
=
turtle
.
Pen
()
pen
=
turtle
.
Pen
()
pen
.
hideturtle
()
pen
.
hideturtle
()
pen
.
fillcolor
(
'green'
)
a
=
[
'yellow'
,
'blue'
,
'green'
,
'red'
]
pen
.
begin_fill
()
pen
.
left
(
45
)
pen
.
forward
(
300
)
for
i
in
range
(
4
):
pen
.
left
(
120
)
pen
.
fillcolor
(
a
[
i
])
pen
.
forward
(
450
)
pen
.
begin_fill
()
pen
.
left
(
120
)
pen
.
forward
(
100
)
pen
.
forward
(
450
)
pen
.
left
(
90
)
pen
.
left
(
120
)
pen
.
circle
(
100
,
45
)
pen
.
forward
(
150
)
pen
.
left
(
90
)
pen
.
left
(
120
)
pen
.
forward
(
100
)
pen
.
forward
(
300
)
pen
.
end_fill
()
pen
.
right
(
120
)
pen
.
right
(
135
)
pen
.
forward
(
450
)
pen
.
right
(
120
)
pen
.
forward
(
450
)
pen
.
right
(
120
)
pen
.
forward
(
150
)
pen
.
end_fill
()
pen
.
fillcolor
(
'red'
)
pen
.
begin_fill
()
for
i
in
range
(
6
):
pen
.
forward
(
150
)
pen
.
right
(
60
)
pen
.
end_fill
()
turtle
.
done
()
turtle
.
done
()
\ No newline at end of file
ewatgwrjkhgq3;t.py
View file @
9c94203b
import
turtle
import
turtle
pen
=
turtle
.
Pen
()
p
pen
.
hideturtle
()
\ No newline at end of file
pen
.
fillcolor
(
'green'
)
pen
.
begin_fill
()
pen
.
begin_forword
(
300
)
pen
.
left
(
120
)
pen
.
forward
(
450
)
pen
.
left
(
120
)
pen
.
forward
(
450
)
pen
.
left
(
120
)
pen
.
forward
(
150
)
turtle
.
done
()
\ No newline at end of file
trgi.py
View file @
9c94203b
with
open
(
r'c:\Users\bellcode\Desktop\天又热感叹人生文件讨厌的人kyfj.txt'
,
'r'
,
encoding
=
'utf-8'
)
as
file
:
with
open
(
r'c:\Users\bellcode\Desktop\天又热感叹人生文件讨厌的人kyfj.txt'
,
'r'
,
encoding
=
'utf-8'
)
as
file
:
a
=
file
.
readlines
()
a
=
file
.
readlines
()
#print(a)
#print(a)
sum
()
=
0
new_data
=
[]
for
i
in
a
:
for
i
in
a
:
daedta
=
i
.
split
()
data
=
i
.
split
()
sum
=
sum
+
int
(
data
)
sum
=
0
resuit
=
data
[
0
]
+
str
(
sum
)
for
j
in
data
[
1
:]:
print
(
resuit
)
sum
=
sum
+
int
(
j
)
\ No newline at end of file
resuit
=
data
[
0
]
+
str
(
sum
)
+
'
\n
'
new_data
.
append
(
resuit
)
print
(
resuit
)
with
open
(
r'c:\Users\bellcode\Desktop\444444.txt'
,
'a'
,
encoding
=
'utf-8'
)
as
file1
:
file1
.
writelines
(
new_data
)
\ 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