Lab 2:Turtle Blast

edwin turtle 2 edwin turtle 2 (2)

Description:Well in this lab we get introduced to the python turtle which is a program that moves to a direction when you type in its degrees to where you want the arrow to go. Well for the lab we were instructed to change the back round color to red and the pointer color to red . after we did that we typed in our individual variables and we ended up getting this sphere looking figure by putting a range of 1 o 100 to the turtle. As you can see that’s the result that i got.

Source code:import turtle

wn=turtle.screen()

wn.bgcolor(red)

alex=turtle.Turtle()

alex.pencolor(white)

for x in range (100):

alex.right(random.randint (0,45))
distance = random.randint (0,150)
alex.forward(distance)
alex.backward(distance)