The analogy of a turtle with a pen attached to its tail is often used.
The turtle's pen can be lifted and lowered, thus drawing a rudimentary dotted line.

An example code:
 FD 20 ; draw a line and move
 PENUP ; lift the pen so it draws nothing
 FD 20 ; move and not draw
 PENDOWN ; lower the pen so it draws again
 FD 20 ; draw a line and move
 PENUP ; lift the pen so it draws nothing
 FD 40 ; move and not draw
 PENDOWN ; lower the pen so it draws again
 RT 20 ; rotate right (clockwise) 20 degrees
The analogy of a turtle with a pen attached to its tail is often used. The turtle's pen can be lifted and lowered, thus drawing a rudimentary dotted line.
An example code:
 FD 20 ; draw a line and move
 PENUP ; lift the pen so it draws nothing
 FD 20 ; move and not draw
 PENDOWN ; lower the pen so it draws again
 FD 20 ; draw a line and move
 PENUP ; lift the pen so it draws nothing
 FD 40 ; move and not draw
 PENDOWN ; lower the pen so it draws again
 RT 20 ; rotate right (clockwise) 20 degrees
UCBLogo