HomeTurtlegraficsGPanelRobotics WebTigerPython |
Python - Online |
Deutsch English |
YOU LEARN HERE... |
some more Turtle commands. You can use them to draw beautiful colored pictures. On the website trinket.io/docs/colors you will find 140 colors that you can use in your Turtle graphics programs. You can see the color name in English by clicking on the desired color with the mouse. The following list shows some color names: yellow, gold, orange, red, maroon, violet, magenta, purple, navy, blue, skyblue, cyan, turquoise, lime, green, darkgreen, chocolate, brown, black, gray, white. |
EXAMPLE |
Programm: from gturtle import * setPenWidth(60) setPenColor("red") forward(100) penUp() forward(50) penDown() setPenColor("yellow") dot(40) setPenWidth(5) setPenColor("black") back(15) hideTurtle() |
REMEMBER... |
Use setPenColor(“color”) to change the pen color. Use setColor(“color”) to change the turtle color. On the website trinket.io/docs/colorsyou will find many other colors that you can use as pen and turtle colors. The color names are not case-sensitive, but they must be enclosed in quotation marks. The # character is used in Python for comments. You can use it to insert comments that are not taken into account when the program is executed. |
TO SOLVE BY YOURSELF |
|