Lab Report 2

This project was very cool once you get the hang of it. You basically need to follow the directions and you’ll get your outcome. It was pretty simple all you need is a little guidance and follow the steps.

code:

import turtle

import random

wn= turtle.Screen ()

wn.bgcolor (“red”)

jamal=turtle.turtle()

jamal.pencolor (“white”)

jamal.speed (0)

for x in range (100) :

angle = random.randint (0,45)

jamal.right (angle)

Distance1 = random.randint (0,150)

jamal.forward(distance1)

jamal.back(distance1)

furqan.

the output looked like this

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *