Question: Please help. I made this code and it displays repeating figures, using turtle program of python. But only with one color. so I was wondering

 Please help. I made this code and it displays repeating figures,

Please help. I made this code and it displays repeating figures, using turtle program of python. But only with one color.

so I was wondering on how to make the figures have random colors, each having different color using RGB system and maybe loops.

it would also help to make it more advanced of modifying pixels. thank you!

File Edit Format View Help import turtle import random wn turtle.Screen() swn.bgcolor("light blue") wn.title("Turtle") s turtle.Turtle() s.color("red" , "blue") r random.randint(100, 255) g random.randint(100, 255) b random.randint (100, 255) def cicfunc (size): for i in range(9): #random-ered" s.fd(size) s.right (90) size size-25 "blue" , "green") , cicfunc(14) cicfunc(120) cicfunc(16) cicfunc(18) cicfunc (66) clcfunc(65) File Edit Format View Help import turtle import random wn turtle.Screen() swn.bgcolor("light blue") wn.title("Turtle") s turtle.Turtle() s.color("red" , "blue") r random.randint(100, 255) g random.randint(100, 255) b random.randint (100, 255) def cicfunc (size): for i in range(9): #random-ered" s.fd(size) s.right (90) size size-25 "blue" , "green") , cicfunc(14) cicfunc(120) cicfunc(16) cicfunc(18) cicfunc (66) clcfunc(65)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!