“Importar tortuga como t” Código de respuesta

Cómo importar tortuga 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

Importar tortuga como t

import turtle # imports the turtle module.
whateveruwanttocallit = turtle.Turtle()

whateveruwanttocallit.fd(10) # moves forward by whatever you put in
whateveruwanttocallit.lt(90) # turns left whatever degrees you put in
whateveruwanttocallit.rt(90) # turns right whatever degrees you put in
whateveruwanttocallit.color('red') # the color
whateveruwanttocallit.up() # lifts the pen up
whateveruwanttocallit.down() #puts the pen down
#you can also import turtle as t to make the 'whateveruwanttocallit' just
#written as t. you can also skip the turtle.Turtle() part.
TopFirebolt_20

Respuestas similares a “Importar tortuga como t”

Preguntas similares a “Importar tortuga como t”

Más respuestas relacionadas con “Importar tortuga como t” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código