Due: Tuesday Sept. 10th by end of lab class, unless given special permission.
Partner Information: Complete this assignment individually.
Submission Instructions: Get checked off by your TA hopefully by the end of your lab class. If you do not finish and need more time your TA can give you permission to upload your solution, entitled YourFirstName-YourLastName-Lab2.py to the BrightSpace Lab 2 Dropbox. It should be done by the end of day after your lab class.
Deadline Reminder: Once this deadline passes on inlabs or two week programming assignments, BrightSpace will no longer accept your Python 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. This will be the same every week.
Learning Outcomes
Be able to modify a simple Python program.
Be able to recognize code and recreate what code is doing
Assignment
Download etch-a-sketch.py and rename it according to the instructions above.
Modify the code and add a second box that has text above that says “Move Mouse”.
Modify the listener code to check to see if the mouse clicks in the second box (the change color box should still work) and if it is clicked you will use two random numbers between will move your mouse to a new random spot on the screen. You can choose to draw lines when you move or not.
You should move in all directions, which means you need random numbers between negative screen space and positive screen space (x , y). The whole screen should be used. Remember 0,0 is in the middle of the screen. You can always take a random number between 0 and width then subtract (width-middle) to get negative numbers.
Grading – 10 points
3 points – A second box that can be recognized by the onclick function. Copy and change the values in the if statement that is given for the first box. At the end, both boxes should work.
2 points for moving turtle just to positive areas.
3 points – Moving the turtle to all quadrants of the screen.
2 points – The Python program is correct.
Grading Turnaround
All in-labs should be graded with scores recorded in BrightSpace as fast as possible. Your TAs are also students so I am going to say that all inlabs will be done within three days
and your outlab programming assignments, that you get two weeks to complete, will have grades posted within one week of the day it was due.