Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé
Classe « RawTurtle » Python 3.13.2

Méthode turtle.RawTurtle.tiltangle

Signature de la méthode tiltangle

def tiltangle(self, angle=None) 

Description

help(RawTurtle.tiltangle)

Set or return the current tilt-angle.

Optional argument: angle -- number

Rotate the turtleshape to point in the direction specified by angle,
regardless of its current tilt-angle. DO NOT change the turtle's
heading (direction of movement).
If angle is not given: return the current tilt-angle, i. e. the angle
between the orientation of the turtleshape and the heading of the
turtle (its direction of movement).

Examples (for a Turtle instance named turtle):
>>> turtle.shape("circle")
>>> turtle.shapesize(5, 2)
>>> turtle.tiltangle()
0.0
>>> turtle.tiltangle(45)
>>> turtle.tiltangle()
45.0
>>> turtle.stamp()
>>> turtle.fd(50)
>>> turtle.tiltangle(-45)
>>> turtle.tiltangle()
315.0
>>> turtle.stamp()
>>> turtle.fd(50)


Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les compléments
Voir le programme détaillé