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
8cba2ae4
authored
Aug 28, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
ef889d85
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
79 deletions
diy.py
rguwu.py
diy.py
View file @
8cba2ae4
'''import turtle
# with open(r'C:\Users\Administrator\Desktop\r.txt','r',encoding='utf-8') as a:
turtle.bgcolor("yellow")
# b=a.read()
turtle.penup()
# c=0
turtle.goto(0,0)
# for i in b:
turtle.pendown()
# if i=='d':
turtle.right(120)
# c+=1
turtle.forward(200)
# print(c)
turtle.right(120)
turtle.forward(200)
turtle.right(120)
turtle.forward(200)
turtle.penup()
turtle.goto(-100,0)
turtle.pendown()
turtle.left(-120)
turtle.forward(100)
turtle.left(120)
turtle.forward(100)
turtle.left(120)
turtle.forward(100)
turtle.hideturtle()
turtle.done()'''
'''import turtle
turtle.penup()
turtle.goto(-130,130)
for i in range(4):
turtle.forward(30)
turtle.pendown()
turtle.forward(200)
turtle.penup()
turtle.forward(30)
turtle.right(90)
turtle.penup()
turtle.hideturtle()
turtle.done()'''
import
turtle
turtle
.
fillcolor
(
"red"
)
turtle
.
begin_fill
()
turtle
.
penup
()
turtle
.
goto
(
0
,
0
)
turtle
.
pendown
()
turtle
.
circle
(
30
)
turtle
.
end_fill
()
turtle
.
penup
()
turtle
.
goto
(
-
100
,
-
20
)
turtle
.
pendown
()
turtle
.
forward
(
200
)
turtle
.
left
(
90
)
turtle
.
forward
(
100
)
turtle
.
left
(
90
)
turtle
.
forward
(
200
)
turtle
.
left
(
90
)
turtle
.
forward
(
100
)
turtle
.
hideturtle
()
rguwu.py
View file @
8cba2ae4
a
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
8
,
8
,
8
,
8
]
with
open
(
r'C:\Users\Administrator\Desktop\tt.txt'
,
"w"
,
encoding
=
"utf-8"
)
as
a
:
b
=
int
(
input
(
"请输入要查找的数字:"
))
pass
# c=[]
# for i in a:
# if b !=i:
# c.append(i)
# print(c)
# while b in a:
# a.remove(b)
# print(a)
i
=
0
while
i
<
len
(
a
):
if
a
[
i
]
==
b
:
a
.
pop
(
i
)
i
-=
1
i
+=
1
print
(
a
)
# c=0
# m=[]
# for i in a:
# if b ==i:
# c=c+1
# else:
# print("没有")
# print(b,"有",c ,"个")
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