To draw a circular dot with the Python turtle module, you can use the turtle dot() function.
import turtle
t = turtle.Turtle()
t.dot()
You can pass a size and a color to dot() if you want to make a dot with specific size or color.
import turtle
t = turtle.Turtle()
t.dot(30,"green")
The turtle module in Python allows us to create graphics easily in our Python code.
One useful function which belongs to the turtle module is the dot() function.
You can use dot() to draw a circular dot on the turtle screen.
dot() takes two parameters. The first parameter is the size of the dot, and the second is the color you want the dot to be.
If you don’t pass values to these parameters, you will get a dot the color of the pen and a dot with size being the maximum of the pen size plus 4 and 2 times the pen size.
Below is a simple example showing you how to draw a dot with dot() in Python.
import turtle
t = turtle.Turtle()
t.dot()
Drawing Dots with Different Colors and Sizes in Python
If you want to draw dots with different colors and sizes with dot(), you can pass values to the size and color parameters of dot(). The size needs to be an integer value greater than 0 and the color can be any valid turtle color.
For example, if you wanted to make a big dot, you could pass 100 to dot().
import turtle
t = turtle.Turtle()
t.dot(100)
If you want to make a green dot, pass “green” to dot().
import turtle
t = turtle.Turtle()
t.dot(100, "green")
Hopefully this article has been useful for you to learn how to use the Python turtle dot() function.