# Lesson 11 solution: Drawing with Turtle
# This is the completed version of lesson11-practice.py. The loop
# repeats 4 times, so it draws a closed square in IDLE.
# NOTE: On a computer with no screen, Turtle cannot open its drawing
# window, so the program prints a message instead of drawing. That is
# expected there — run it in IDLE on your own computer to see the square.

import turtle

try:
    t = turtle.Turtle()
    t.color("blue")
    for side in range(4):
        t.forward(100)
        t.right(90)
    turtle.done()
except Exception:
    print("Turtle needs a screen to draw.")
    print("In IDLE, this program draws a square: 4 sides of 100 steps.")
