Rainbow-Spiral - Python Turtle
Turtle:
“Turtle” is a python library which has a pointing device(turtle) and a canvas, which lets you command a turtle to make shapes. It is a useful library from which beginers can start with. It was part of the original Logo programming language developed by Wally Feurzeig, Seymour Papert and Cynthia Solomon in 1967.
Rainbow Spiral :
Turtle Methods Used:
- turtle.fd(distance) : Move the turtle forward by the specified distance, in the direction the turtle is headed.
- turtle.rt(angle) : Turn turtle right by angle units. (Units are by default degrees, but can be set via the degrees() and radians() functions.)
- turtle.pencolor(*args) : pencolor(r, g, b) - Set pencolor to the RGB color represented by r, g, and b. Each of r, g, and b must be in the range 0..colormode.
- turtle.bgcolor(*args) : args – a color string or three numbers in the range 0..colormode or a 3-tuple of such numbers, Set or return background color of the TurtleScreen.
- turtle.colormode(cmode=None) : cmode – one of the values 1.0 or 255, Return the colormode or set it to 1.0 or 255. Subsequently r, g, b values of color triples have to be in the range 0..cmode.
- turtle.title(titlestring) : titlestring – a string that is shown in the titlebar of the turtle graphics window, Set title of turtle window to titlestring.
- turtle.speed(speed=None) : speed – an integer in the range 0..10 or a speedstring, Set the turtle’s speed to an integer value in the range 0..10.