Home  >  Article  >  Backend Development  >  What is fd() in python

What is fd() in python

silencement
silencementOriginal
2019-05-20 13:11:3758619browse

What is fd() in python

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

The 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 filling graphics;

4) turtle.circle(50, steps=3): The circle function has been used before to draw a circle with a radius of radius , here is the extension, steps represents the built-in steps polygon within a circle with a radius 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): Corresponds to the forward() function. Here, lines and arrows are drawn from the tail to the head;

9) turtle.left(angle): Turn 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 , reset the turtle state to the initial state;

14) turtle.showturtle(): corresponds to the hideturtle() function;

15) turtle.filling() : Returns whether the current turtle is filling; true means filling, false means not filling;

16) turtle.isvisible(): Returns whether the current turtle is visible.

Related learning recommendations: python tutorial

The above is the detailed content of What is fd() in python. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn