Programming Assignment #5: Turtle Graphics
This programing assignment is explained on page 251 of your book in
exercise 6.23. Instead of the book's commands, though, use the following
commands:
Command Meaning
--------- ------------
up Pen up
penup Pen up
pen up Pen up
u Pen up
down Pen down
pendown Pen down
pen down Pen down
d Pen down
right Turn right
turn right Turn right
left Turn left
turn left Turn left
10 Forward 10
forward 20 Forward 20
f 30 Forward 30
f40 Forward 40
print Print screen
show Print screen
end End program
quit End program
All commands should be case-insensitive. You don't have to write any
turtle graphics programs yourself.
For extra credit, you can implement:
- Turns other than 90 and 270 degrees.
- Wrap around mode (allow the turtle to wrap around the screen when
it moves).
- Ability to change the pen character.
- A command to return the turtle to the middle of the screen.
- A clear screen command.
- Repeat the previous command a specified number of times.
- More than one command per line.
- Ability to let the user define new commands.