“Samouczek Python Turtle” Kod odpowiedzi

Samouczek Python Turtle

>>> turtle.position()
(0.00,240.00)
>>> turtle.setx(10)
>>> turtle.position()
(10.00,240.00)
Outrageous Oryx

Samouczek Python Turtle

 >>> tp = turtle.pos()
 >>> tp
 (0.00,0.00)
 >>> turtle.setpos(60,30)
 >>> turtle.pos()
 (60.00,30.00)
 >>> turtle.setpos((20,80))
 >>> turtle.pos()
 (20.00,80.00)
 >>> turtle.setpos(tp)
 >>> turtle.pos()
 (0.00,0.00)
Long Ladybird

Samouczek Python Turtle

>>> turtle.heading()
22.0
>>> turtle.left(45)
>>> turtle.heading()
67.0
Outrageous Oryx

Samouczek Python Turtle

>>> turtle.position()
(0.00,40.00)
>>> turtle.sety(-10)
>>> turtle.position()
(0.00,-10.00)
Outrageous Oryx

Samouczek Python Turtle

>>> turtle.position()
(0.00,0.00)
>>> turtle.backward(30)
>>> turtle.position()
(-30.00,0.00)
Outrageous Oryx

Samouczek Python Turtle

>>> turtle.heading()
90.0
>>> turtle.position()
(0.00,-10.00)
>>> turtle.home()
>>> turtle.position()
(0.00,0.00)
>>> turtle.heading()
0.0
Outrageous Oryx

Samouczek Python Turtle

>>> turtle.color("blue")
>>> turtle.stamp()
11
>>> turtle.fd(50)
Outrageous Oryx

Samouczek Python Turtle

>>> turtle.position()
(0.00,0.00)
>>> turtle.forward(25)
>>> turtle.position()
(25.00,0.00)
>>> turtle.forward(-75)
>>> turtle.position()
(-50.00,0.00)
Outrageous Oryx

Samouczek Python Turtle

>>> turtle.speed()
3
>>> turtle.speed('normal')
>>> turtle.speed()
6
>>> turtle.speed(9)
>>> turtle.speed()
9
Outrageous Oryx

Samouczek Python Turtle

>>> turtle.home()
>>> turtle.dot()
>>> turtle.fd(50); turtle.dot(20, "blue"); turtle.fd(50)
>>> turtle.position()
(100.00,-0.00)
>>> turtle.heading()
0.0
Outrageous Oryx

Odpowiedzi podobne do “Samouczek Python Turtle”

Pytania podobne do “Samouczek Python Turtle”

Więcej pokrewnych odpowiedzi na “Samouczek Python Turtle” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu