“Documentation Python Turtle” Réponses codées

comment importer des tortues en python

import turtle # imports it
whateverYouWantToCallIt = turtle.Turtle() # adds it to the project
#code
whateverYouWantToCallIt.forward(10) # moves whateverYouWantToCallIt forward
whateverYouWantToCallIt.color("purple") # color
whateverYouWantToCallIt.left(90) # turns him 90 degrees
whateverYouWantToCallIt.right(90) # turns him 90 degrees the other direction
Scared Creeper

tortue python

import turtle
myTurtle = turtle.Turtle()

myTurtle.forward(100)
myTurtle.right(90)
myTurtle.forward(100)
MunchDuster

Module de tortue python

from turtle import *
color('red', 'yellow')
begin_fill()
while True:
    forward(200)
    left(170)
    if abs(pos()) < 1:
        break
end_fill()
done()
Eager Echidna

Documentation Python Turtle

>>> turtle.speed()
3
>>> turtle.speed('normal')
>>> turtle.speed()
6
>>> turtle.speed(9)
>>> turtle.speed()
9
Unusual Unicorn

Réponses similaires à “Documentation Python Turtle”

Questions similaires à “Documentation Python Turtle”

Plus de réponses similaires à “Documentation Python Turtle” dans Python

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code