This document provides Python source code to create a colorful star shape using turtle graphics. The code first imports the turtle module and sets the turtle shape. It then defines a list of colors and uses a for loop repeating 5 times to: 1) set the turtle color from the list, 2) move the turtle forward 200 units, and 3) turn the turtle 144 degrees left.
This document provides Python source code to create a colorful star shape using turtle graphics. The code first imports the turtle module and sets the turtle shape. It then defines a list of colors and uses a for loop repeating 5 times to: 1) set the turtle color from the list, 2) move the turtle forward 200 units, and 3) turn the turtle 144 degrees left.
This document provides Python source code to create a colorful star shape using turtle graphics. The code first imports the turtle module and sets the turtle shape. It then defines a list of colors and uses a for loop repeating 5 times to: 1) set the turtle color from the list, 2) move the turtle forward 200 units, and 3) turn the turtle 144 degrees left.
Hey coder please make use of indentation (a coding line use for the arrangement of code in python script.)
1. from turtle import*
2. shape(“turtle”) 3. col=[“red”,”blue”,”yellow”,”green”,”purple”] Color to use 4. for i in range(5): To repeat following process five times 5. color(col[i]) To change color of line 6. forward(200) To advance 200 straight ahead 7. left(144) To turn 144 degrees to left 8. 9. done() Result Display of the above correct ……. If Absolutely correct