Se ofrecen a continuación unas posibles soluciones de los ejercicios (1) del módulo turtle. Los ejercicios están separados en dos bloques:
from turtle import *
setup(640, 480, -1, 0)
exitonclick()
Los valores a escribir dependen del tamaño de la pantalla.
from turtle import *
setup(640, 480, 300, 360)
exitonclick()
from turtle import *
setup(200, 200, 0, 0)
screensize(100, 100)
exitonclick()
from turtle import *
setup(200, 200, 0, 0)
screensize(400, 400)
exitonclick()
from turtle import *
setup(200, 200, 0, 0)
screensize(400, 100)
exitonclick()
from turtle import *
setup(200, 200, 0, 0)
screensize(100, 800)
exitonclick()
from turtle import *
setup(400, 200, 0, 0)
screensize(800, 300)
exitonclick()
from turtle import *
setup(400, 200, 0, 0)
screensize(600, 300)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
colormode(255)
hideturtle()
penup()
dot(5, 0, 0, 0)
goto(100, 0)
dot(5, 0, 0, 255)
goto(100, 100)
dot(5, 255, 0, 0)
goto(0, 100)
dot(5, 0, 255, 0)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
colormode(255)
hideturtle()
penup()
goto(100, 100)
dot(10, 0, 0, 0)
goto(100, -100)
dot(10, 255, 0, 0)
goto(-100, -100)
dot(10, 0, 255, 0)
goto(-100, 100)
dot(10, 0, 0, 255)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
colormode(255)
hideturtle()
penup()
goto(-100, 100)
dot(10, 255, 0, 0)
goto(-33, 33)
dot(10, 0, 0, 0)
goto(33, -33)
dot(10, 0, 0, 255)
goto(100, -100)
dot(10, 0, 255, 0)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
colormode(255)
hideturtle()
penup()
goto(-100, 0)
dot(10, 0, 0, 0)
goto(-50, 0)
dot(10, 51, 51, 51)
goto(0, 0)
dot(10, 102, 102, 102)
goto(50, 0)
dot(10, 153, 153, 153)
goto(100, 0)
dot(10, 204, 204, 204)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
colormode(255)
hideturtle()
penup()
goto(0, 80)
dot(40, 0, 0, 255)
goto(0, 40)
dot(40, 255, 0, 0)
goto(0, 0)
dot(40, 0, 0, 0)
goto(0, -40)
dot(40, 0, 255, 0)
goto(0, -80)
dot(40, 255, 0, 255)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
colormode(255)
hideturtle()
penup()
dot(200, 0, 0, 0)
dot(160, 255, 255, 255)
dot(120, 0, 0, 0)
dot(80, 255, 255, 255)
dot(40, 0, 0, 0)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
hideturtle()
penup()
goto(-100, 0)
pendown()
goto(100, 0)
penup()
goto(0, 100)
pendown()
goto(0, -100)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
hideturtle()
penup()
goto(-50, 50)
pendown()
goto(50, 50)
goto(50, -50)
goto(-50, -50)
goto(-50, 50)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
hideturtle()
penup()
goto(-100, 0)
pendown()
goto(0, 100)
penup()
goto(-100, -100)
pendown()
goto(100, 100)
penup()
goto(0, -100)
pendown()
goto(100, 0)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
hideturtle()
penup()
goto(-100, 100)
pendown()
goto(-33, 33)
penup()
goto(-100, -100)
pendown()
goto(-33, -33)
penup()
goto(100, 100)
pendown()
goto(33, 33)
penup()
goto(100, -100)
pendown()
goto(33, -33)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
hideturtle()
penup()
goto(-50, 100)
pendown()
goto(-50, -100)
penup()
goto(50, 100)
pendown()
goto(50, -100)
penup()
goto(-100, 50)
pendown()
goto(100, 50)
penup()
goto(-100, -50)
pendown()
goto(100, -50)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
hideturtle()
penup()
goto(-33, 100)
pendown()
goto(100, -33)
penup()
goto(-100, 33)
pendown()
goto(33, -100)
penup()
goto(-100, -33)
pendown()
goto(33, 100)
penup()
goto(-33, -100)
pendown()
goto(100, 33)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
hideturtle()
penup()
goto(-100, 50)
pendown()
goto(100, 50)
goto(100, -50)
goto(-100, -50)
goto(-100, 50)
penup()
goto(0, 50)
pendown()
goto(0, -50)
penup()
goto(-50, 0)
dot(50, 0, 0, 0)
goto(50, 0)
dot(50, 0, 0, 0)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
hideturtle()
penup()
goto(-100, 100)
pendown()
goto(100, 100)
goto(100, -100)
goto(-100, -100)
goto(-100, 100)
penup()
goto(-66, -100)
pendown()
goto(-66, 33)
goto(66, 33)
goto(66, -100)
penup()
goto(0, 66)
dot(66, 0, 0, 0)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
hideturtle()
penup()
goto(0, 100)
pendown()
goto(100, 0)
goto(0, -100)
goto(-100, 0)
goto(0, 100)
penup()
goto(-50, 50)
pendown()
goto(0, 0)
goto(-50, -50)
penup()
goto(-50, 0)
dot(50, 0, 0, 0)
exitonclick()
from turtle import *
setup(250, 250, 0, 0)
screensize(120, 120)
hideturtle()
penup()
goto(-100, 0)
pendown()
goto(-50, 50)
goto(50, -50)
goto(100, 0)
goto(50, 50)
goto(-50, -50)
goto(-100, 0)
penup()
goto(0, 50)
dot(50, 0, 0, 0)
goto(0, -50)
dot(50, 0, 0, 0)
exitonclick()