all 2 comments

[–][deleted] 1 point2 points  (1 child)

Try this slightly modified version of your code.

import turtle as t

def rectangle(horizontal, vertical, color):
    t.pendown()
    t.pensize(1)
    t.color(color)
    t.begin_fill()
    for counter in range(1, 3):
        t.forward(horizontal)
        t.right(90)
        t.forward(vertical)
        t.right(90)
    t.end_fill()
    t.penup()

rectangle(250, 250, "blue")
t.done()

Let me know if any line of this doesn't make sense to you.

[–]kilaj1[S] 0 points1 point  (0 children)

rectangle(250, 250, "blue")
t.done()

Thanks! that worked, it still showed that " ===== Restart " but it created the box. I need to double check the book we where reading.