Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/smanonr..../lib64/python3....
File: turtle.py
if i == 2:
[4000] Fix | Delete
color("maroon")
[4001] Fix | Delete
end_fill()
[4002] Fix | Delete
up()
[4003] Fix | Delete
forward(30)
[4004] Fix | Delete
down()
[4005] Fix | Delete
width(1)
[4006] Fix | Delete
color("black")
[4007] Fix | Delete
# move out of the way
[4008] Fix | Delete
tracer(False)
[4009] Fix | Delete
up()
[4010] Fix | Delete
right(90)
[4011] Fix | Delete
forward(100)
[4012] Fix | Delete
right(90)
[4013] Fix | Delete
forward(100)
[4014] Fix | Delete
right(180)
[4015] Fix | Delete
down()
[4016] Fix | Delete
# some text
[4017] Fix | Delete
write("startstart", 1)
[4018] Fix | Delete
write("start", 1)
[4019] Fix | Delete
color("red")
[4020] Fix | Delete
# staircase
[4021] Fix | Delete
for i in range(5):
[4022] Fix | Delete
forward(20)
[4023] Fix | Delete
left(90)
[4024] Fix | Delete
forward(20)
[4025] Fix | Delete
right(90)
[4026] Fix | Delete
# filled staircase
[4027] Fix | Delete
tracer(True)
[4028] Fix | Delete
begin_fill()
[4029] Fix | Delete
for i in range(5):
[4030] Fix | Delete
forward(20)
[4031] Fix | Delete
left(90)
[4032] Fix | Delete
forward(20)
[4033] Fix | Delete
right(90)
[4034] Fix | Delete
end_fill()
[4035] Fix | Delete
# more text
[4036] Fix | Delete
[4037] Fix | Delete
def demo2():
[4038] Fix | Delete
"""Demo of some new features."""
[4039] Fix | Delete
speed(1)
[4040] Fix | Delete
st()
[4041] Fix | Delete
pensize(3)
[4042] Fix | Delete
setheading(towards(0, 0))
[4043] Fix | Delete
radius = distance(0, 0)/2.0
[4044] Fix | Delete
rt(90)
[4045] Fix | Delete
for _ in range(18):
[4046] Fix | Delete
switchpen()
[4047] Fix | Delete
circle(radius, 10)
[4048] Fix | Delete
write("wait a moment...")
[4049] Fix | Delete
while undobufferentries():
[4050] Fix | Delete
undo()
[4051] Fix | Delete
reset()
[4052] Fix | Delete
lt(90)
[4053] Fix | Delete
colormode(255)
[4054] Fix | Delete
laenge = 10
[4055] Fix | Delete
pencolor("green")
[4056] Fix | Delete
pensize(3)
[4057] Fix | Delete
lt(180)
[4058] Fix | Delete
for i in range(-2, 16):
[4059] Fix | Delete
if i > 0:
[4060] Fix | Delete
begin_fill()
[4061] Fix | Delete
fillcolor(255-15*i, 0, 15*i)
[4062] Fix | Delete
for _ in range(3):
[4063] Fix | Delete
fd(laenge)
[4064] Fix | Delete
lt(120)
[4065] Fix | Delete
end_fill()
[4066] Fix | Delete
laenge += 10
[4067] Fix | Delete
lt(15)
[4068] Fix | Delete
speed((speed()+1)%12)
[4069] Fix | Delete
#end_fill()
[4070] Fix | Delete
[4071] Fix | Delete
lt(120)
[4072] Fix | Delete
pu()
[4073] Fix | Delete
fd(70)
[4074] Fix | Delete
rt(30)
[4075] Fix | Delete
pd()
[4076] Fix | Delete
color("red","yellow")
[4077] Fix | Delete
speed(0)
[4078] Fix | Delete
begin_fill()
[4079] Fix | Delete
for _ in range(4):
[4080] Fix | Delete
circle(50, 90)
[4081] Fix | Delete
rt(90)
[4082] Fix | Delete
fd(30)
[4083] Fix | Delete
rt(90)
[4084] Fix | Delete
end_fill()
[4085] Fix | Delete
lt(90)
[4086] Fix | Delete
pu()
[4087] Fix | Delete
fd(30)
[4088] Fix | Delete
pd()
[4089] Fix | Delete
shape("turtle")
[4090] Fix | Delete
[4091] Fix | Delete
tri = getturtle()
[4092] Fix | Delete
tri.resizemode("auto")
[4093] Fix | Delete
turtle = Turtle()
[4094] Fix | Delete
turtle.resizemode("auto")
[4095] Fix | Delete
turtle.shape("turtle")
[4096] Fix | Delete
turtle.reset()
[4097] Fix | Delete
turtle.left(90)
[4098] Fix | Delete
turtle.speed(0)
[4099] Fix | Delete
turtle.up()
[4100] Fix | Delete
turtle.goto(280, 40)
[4101] Fix | Delete
turtle.lt(30)
[4102] Fix | Delete
turtle.down()
[4103] Fix | Delete
turtle.speed(6)
[4104] Fix | Delete
turtle.color("blue","orange")
[4105] Fix | Delete
turtle.pensize(2)
[4106] Fix | Delete
tri.speed(6)
[4107] Fix | Delete
setheading(towards(turtle))
[4108] Fix | Delete
count = 1
[4109] Fix | Delete
while tri.distance(turtle) > 4:
[4110] Fix | Delete
turtle.fd(3.5)
[4111] Fix | Delete
turtle.lt(0.6)
[4112] Fix | Delete
tri.setheading(tri.towards(turtle))
[4113] Fix | Delete
tri.fd(4)
[4114] Fix | Delete
if count % 20 == 0:
[4115] Fix | Delete
turtle.stamp()
[4116] Fix | Delete
tri.stamp()
[4117] Fix | Delete
switchpen()
[4118] Fix | Delete
count += 1
[4119] Fix | Delete
tri.write("CAUGHT! ", font=("Arial", 16, "bold"), align="right")
[4120] Fix | Delete
tri.pencolor("black")
[4121] Fix | Delete
tri.pencolor("red")
[4122] Fix | Delete
[4123] Fix | Delete
def baba(xdummy, ydummy):
[4124] Fix | Delete
clearscreen()
[4125] Fix | Delete
bye()
[4126] Fix | Delete
[4127] Fix | Delete
time.sleep(2)
[4128] Fix | Delete
[4129] Fix | Delete
while undobufferentries():
[4130] Fix | Delete
tri.undo()
[4131] Fix | Delete
turtle.undo()
[4132] Fix | Delete
tri.fd(50)
[4133] Fix | Delete
tri.write(" Click me!", font = ("Courier", 12, "bold") )
[4134] Fix | Delete
tri.onclick(baba, 1)
[4135] Fix | Delete
[4136] Fix | Delete
demo1()
[4137] Fix | Delete
demo2()
[4138] Fix | Delete
exitonclick()
[4139] Fix | Delete
[4140] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function