fd() in python is a method in the turtle module. The actual parameter of the fd method is the pixel distance. turtle module: It allows you to draw images using turtle graphics
Functions in the turtle module:
1) turtle.pensize(): Set the thickness of the line;
2) turtle.speed(): Set the drawing speed, 1-10, 1 is the slowest, 10 is the fastest;
3) turtle.begin_fill(): Prepare to start Fill graphics;
4) turtle.circle(50, steps=3): The circle function has been used before. It draws a circle with a radius of radius. Here is the expansion. Steps is expressed in the radius. Built-in steps polygon within a circle of 50;
5) turtle.end_fill(): Filling completed;
6) turtle.write(s,font=( "font-name", font_size, "font_type")): Write text, s is the text content, font is the parameter of the font, which are the font name, size and type;
7) turtle .hideturtle(): Hide arrow display;
In addition, there are other turtle functions, such as:
8) turtle.backward(d): and forward( ) function corresponds, here we draw lines and arrows from the tail to the head;
9) turtle.left(angle): rotate the arrow direction counterclockwise;
10 ) turtle.undo(): Undo the previous turtle action;
11) turtle.screensize(w,h): Set the length and width of the turtle window;
12) turtle.clear(): Clear the turtle window, but the position and status of the turtle will not change;
13) turtle.reset(): Clear the window and reset the turtle status to the starting state ;
14) turtle.showturtle(): Corresponds to the hideturtle() function;
15) turtle.filling(): Returns whether it is currently filling; true means filling, false means not filling;
16) turtle.isvisible(): Returns whether the current turtle is visible.
The above is the detailed content of What does d mean in python?. For more information, please follow other related articles on the PHP Chinese website!