Changing the Pen Size
- The previous command changed the size of the turtle’s shape only. However, sometimes, you may need to increase or decrease the thickness of your pen. You can do this using the following command.
Source Code:
# Follow : Programmerfect
import turtle as t
t.pensize(5)
t.forward(100)
import turtle as t
t.pensize(5)
t.forward(100)
Output:
Note : As you can see, the size of your pen is now five times the original size
(which was one). Try drawing some more lines of various sizes, and
compare the difference in thickness between them.
Recommended Posts:
- The Turtle Graphics Package
- Turtle Graphics Method
- Programming With Turtle
- Drawing a Shape
- Drawing Preset Figures
- Changing the Screen Color
- Changing the Screen Title
- Changing the Turtle Size