# Arup Guha
# 12/8/2020
# Solution to COP 2930 Final Exam Part B Problem 3

import turtle

# Set color and start fill.
turtle.fillcolor("green")
turtle.begin_fill()

# A square is 4 repetitions of moving and turning, then end the fill.
for i in range(4):
    turtle.forward(100)
    turtle.left(90)
turtle.end_fill()

# Change the color, move to our new bottom left corner and begin the fill.
turtle.fillcolor("red")
turtle.forward(100)
turtle.begin_fill()

# This one's more annoying, so we can only repeat the same stuff twice.
for i in range(2):
    turtle.forward(100)
    turtle.left(90)
    turtle.forward(200)
    turtle.left(90)
turtle.end_fill()

# Same here...
turtle.fillcolor("blue")
turtle.forward(100)
turtle.begin_fill()
for i in range(2):
    turtle.forward(100)
    turtle.left(90)
    turtle.forward(300)
    turtle.left(90)
turtle.end_fill()
