Assignment 3 : Turtle Graphics

Description

Using the turtle and random modules in Python, create a screen that has a red background and 100 lines with random lengths (between 0 and 150 pixels) that are a random angle (between 0 and 45 apart from each other).

My Experience

The assignment was mostly easy, but I had a rough time figuring out how to make the turtle move backwards the same distance as it moved forward. I tried fiddling around with the backward command and the random.randrange command but I couldn’t get the turtle to move how I wanted it to. So instead of moving it backwards, I made it go back to the starting point (0,0) instead of telling it to specifically move backwards.

Gallery of Screenshots