Solution
Hints
Steps
  1. Import turtle and create one Turtle instance.
  2. Call forward(100) then right(90) four separate times, one after another -- no loop needed for a shape this small.
  3. After the fourth turn, the turtle faces its original direction again and the four corners meet, closing the square.
  4. For the stretch goal, repeat the same four-step pattern with a shorter forward distance (e.g. 50) to draw a smaller square, starting from wherever the turtle currently sits.
import turtle monty = turtle.Turtle() monty.shape('turtle') monty.forward(100) monty.right(90) monty.forward(100) monty.right(90) monty.forward(100) monty.right(90) monty.forward(100) monty.right(90)
See also: Sample Turtle Graphics Program (Chapter 14, Computational Thinking, Scratch & Python): https://dmccreary.github.io/learning-python/python-labs/02-simple-square/ -- this card's solution matches that lab's own reference code exactly.