CSCI 107 Assignment 9
- Due Date: Monday, May 1st no later than 11:59 p.m.
- Partner Information: You may complete this assignment individually or
with exactly one classmate.
- Submission Instructions (working alone): Upload your solution,
entitled YourFirstName-YourLastName-Assignment9.py
to the BrightSpace Assignment 9 Dropbox.
- Submission Instructions (working with one classmate): Upload your
solution, entitled
YourFirstName-YourLastName-PartnerFirstName-PartnerLastName-Assignment9.py
to the BrightSpace Assignment 9 Dropbox. Note: If you work with a
partner, only one person needs to submit a solution. If you both
submit a solution, the submission that will be graded is the one from
the partner whose last name comes alphabetically first.
- Deadline Reminder: Once the submission deadline passes, BrightSpace
will no longer accept your submission and you will no longer be able
to earn credit. Thus, if you are not able to fully complete the
assignment, submit whatever you have before the deadline so that
partial credit can be earned.
Turtle Graphics String Commands
The purpose of this final assignment of the semester is to give you experience
working with strings. By processing a provided string correctly, your
program will produce a Turtle Graphics drawing.
Assignment
Take assignment9.py and rename it
according to the instructions above. Based on the command string
in the main function, the program will create a turtle graphics
drawing based on the commands in the string.
In the provided program, drawing
would be produced.
Required String Commands
- N or n: The next 3 characters in the string will specify the
number of pixels that the turtle should be moved north.
Call the provided move function appropriately.
- S or s: The next 3 characters in the string will specify the
number of pixels that the turtle should be moved south.
Call the provided move function appropriately.
- E or e: The next 3 characters in the string will specify the
number of pixels that the turtle should be moved east.
Call the provided move function appropriately.
- W or w: The next 3 characters in the string will specify the
number of pixels that the turtle should be moved west.
Call the provided move function appropriately.
- B or b: Change the color of the turtle to blue.
- G or g: Change the color of the turtle to green.
- R or r: Change the color of the turtle to red.
- Y or y: Change the color of the turtle to yellow.
Requirements and Grading
- 40 points - Moving north, south, east and west the specified number
of pixels all work properly. Each direction is worth 10 points
All or nothing.
- 10 points - The move function is utilized properly.
All or nothing.
- 10 points - Changing the color of the turtle to any of blue,
green, red or yellow works properly. All or nothing.
- 20 points - One or more non-trivial commands of your choosing
are implemented. For example, you could implement a command
that draws a circle of a specified radius.
- 20 points - The command_string variable in the main
function is modified to a string that illustrates every command that
is implemented (10 points). The drawing that is produced
should be non-trivial and aesthetically pleasing (10 points).