Python Program Rainbow Using Turtle
- Turtle is a Python feature like a drawing board.
- Turtle is a special feathers of Python.
- You can use functions like turtle.forword (....) and turtle.left(....) which can move the turtle around the board.
- range (360) turtle.
- These are Python Turtle project, you are going to draw a RAINBOW.
Installation
or
The First step is to import libraries
or
Rainbow.py
# import turtle library
import turtle
colors = [ "red","orange","yellow","green","blue","pink"]
my_arrow = turtle.Pen()
turtle.bgcolor("black")
for x in range(360):
my_arrow.pencolor(colors[x % 6])
my_arrow.width(x/50 + 1)
my_arrow.forward(x)
my_arrow.left(59)
0 Comments
Please Do Not Comments Any Span Or Span link..