Source Code :
import turtle
import random
sc = turtle.Screen()
sc.bgcolor('black')
tr = turtle.Turtle()
color = ['red', 'blue', 'white']
for i in range(50):
tr.color(random.choice(color))
tr.forward(i * 10)
tr.right(144)
turtle.done()
#execute.....
If you have any doubts, Please let me know