145k views
5 votes
A tick is a short line that is used to mark off units of distance along a line. Write a function named drawTick() that uses a turtle parameter to draw a single tick of specified length perpendicular to the initial orientation of the turtle. The function drawTick() takes two parameters: 1. a turtle, t, that is used to draw 2. an integer, tickLen, that is the length of the tick.

1 Answer

2 votes
We are to write a function with the name drawTick()
It has two parameters: a turtle t and an integer tickLen which is the length of the tick

The function then is
drawTick(perpendicular(t), 0.01) indicating that the tick is perpendicular to the turtle and has a length of 0.01 m.
User Andy Groff
by
8.0k points