Turtle

import turtle
import random
create = turtle.Screen()
create.bgcolor(“Red”)

imagine = turtle.Turtle()
imagine.pencolor(“White”)
imagine.pensize(1.5)

kwu = 100

for x in range(kwu):
cake = random.randrange(0, 45)
pie = random.randrange(0 ,150)
imagine.right(cake)
imagine.fd(pie)
imagine.backward(pie)

First we have to import turtle for the code to work. Next we import random so our lines will move in different directions. After, I names my turtle imagine and I set it equal to turtle.Turtle() then I set the pen a color which will be white and the pen size is 1.5. I have kwu = 100 to represent the number of times it would move. By using the for x in range(kwu) I have to have different ranges for the turtle to work. I use the function random to randomize the numbers from 0 and 45 and also 0 and 150.