| 2 pts. | Graphics window pops up with a reasonable title | 
| 2 pts. | Candidate pictures are centered in their respective columns | 
| 2 pts. | Vote totals are centered below candidate pictures | 
| 5 pts. | List of unused states displays in center of screen 0 points: Displays with brackets and quotation marks 0 points: Spills outside of window | 
| 2 pts. | Entry box for state names displays at bottom of screen | 
| 2 pts. | Instructions for entry box display at bottom of screen | 
| 5 pts. | Program does not respond to clicks outside of the two candidate pictures | 
| 2 pts. | Program prints an error message indicating state non-existent if the user clicks a candidate without typing any text | 
| 2 pts. | Program prints an error message indicating state non-existent if the user types 3 characters and then clicks a candidate | 
| 2 pts. | Program prints an error message indicating state non-existent if the user types "qq" and then clicks a candidate | 
| 3 pts. | Program prints an error message indicating state already entered if the user types "CA", clicks a candidate, and clicks the same candidate again | 
| 3 pts. | Program prints an error message indicating state already entered if the user types "CA", clicks a candidate, and then clicks the other candidate | 
| 3 pts. | Program prints an error message when the graphical window is abruptly closed by the user. In other words, program does not crash but exits cleanly. | 
| Action | New totals | Change to state list | 
|---|---|---|
| Clinton wins WA | Clinton: 12 Trump: 0 | WA removed | 
| Clinton wins or | Clinton: 19 Trump: 0 | OR removed | 
| Clinton wins Ca | Clinton: 74 Trump: 0 | CA removed | 
| Trump wins aK | Clinton: 74 Trump: 3 | AK removed | 
| Clinton wins HI | Clinton: 78 Trump: 3 | HI removed | 
| Trump wins az | Clinton: 78 Trump: 14 | AZ removed | 
| Clinton wins Nv | Clinton: 84 Trump: 14 | NV removed | 
| Trump wins uT | Clinton: 84 Trump: 20 | UT removed | 
| Trump wins ID | Clinton: 84 Trump: 24 | ID removed | 
| Trump wins MT | Clinton: 84 Trump: 27 | MT removed | 
| Trump wins WY | Clinton: 84 Trump: 30 | WY removed | 
| Clinton wins CO | Clinton: 93 Trump: 30 | CO removed | 
| Clinton wins NM | Clinton: 98 Trump: 30 | NM removed | 
| Trump wins TX | Clinton: 98 Trump: 68 | TX removed | 
| Trump wins OK | Clinton: 98 Trump: 75 | OK removed | 
| Trump wins KS | Clinton: 98 Trump: 81 | KS removed | 
| Trump wins NE | Clinton: 98 Trump: 86 | NE removed | 
| Trump wins SD | Clinton: 98 Trump: 89 | SD removed | 
| Trump wins ND | Clinton: 98 Trump: 92 | ND removed | 
| Clinton wins MN | Clinton: 108 Trump: 92 | MN removed | 
| Clinton wins IA | Clinton: 114 Trump: 92 | IA removed | 
| Trump wins MO | Clinton: 114 Trump: 102 | MO removed | 
| Trump wins AR | Clinton: 114 Trump: 108 | AR removed | 
| Trump wins LA | Clinton: 114 Trump: 116 | LA removed | 
| Trump wins MS | Clinton: 114 Trump: 122 | MS removed | 
| Clinton wins IL | Clinton: 134 Trump: 122 | IL removed | 
| Clinton wins MI | Clinton: 150 Trump: 122 | MI removed | 
| Trump wins IN | Clinton: 150 Trump: 133 | IN removed | 
| Clinton wins OH | Clinton: 168 Trump: 133 | OH removed | 
| Trump wins WV | Clinton: 168 Trump: 138 | WV removed | 
| Clinton wins PA | Clinton: 188 Trump: 138 | PA removed | 
| Clinton wins NY | Clinton: 217 Trump: 138 | NY removed | 
| Clinton wins MA | Clinton: 228 Trump: 138 | MA removed | 
| Clinton wins NJ | Clinton: 242 Trump: 138 | NJ removed | 
| Trump wins TX | Clinton: 242 Trump: 138 | none | 
| Clinton wins xx | Clinton: 242 Trump: 138 | none | 
| Clinton wins FL | Clinton: 271 Trump: 138 | none; Clinton wins | 
Points are subtracted for the following errors:
| -3 | Output sequence is not same as above | -8 | Displayed state list is never updated | 
| -5 | Circling the winner and/or crossing out the loser does not work | 
| -5 | State input is not case-insensitive | 
| -3 | States are removed from the list if the user types the state name and then clicks outside the candidate pictures | 
| -3 | Window closes immediately after circling winner and crossing out loser | 
| -3 | Votes are not added correctly | 
| [3] | There is a docstring at the top of the submitted file with your name (first and last), the course (CS 115) and assignment (Project 2), and a brief description of the program. | 
| -1 | Missing name | 
| -1 | Missing or wrong course and/or assignment | 
| -1 | Missing or wrong description | 
| [5] | Program is broken up into logical, well-defined functions. Functions perform specific, well-defined jobs and have descriptive names. Functions are no more than 20 lines of code. | 
| -1 | Minor lapses | 
| -3 | Major flaws | 
| -5 | Program does not have student-written functions | 
| [5] | Functions have no more parameters than necessary to do their jobs. Return values are used appropriately. | 
| -1 | Minor flaws | 
| -3 | Major flaws | 
| -5 | Program does not have student-written functions | 
| [3] | Each function includes a docstring explaining the job it does, its input parameters, its return value, and any assumptions it makes about its inputs. See proj2_support_code.py for examples. | 
| -1 | Minor lapses | 
| -2 | Some functions do not have comments, or comments do not contain the required info | 
| -3 | Most functions do not have comments | 
Not counting the docstrings for your program and functions, your program should contain at least three comments explaining aspects of your code that are potentially tricky for a person reading it to understand. You should assume that the person understands what Python syntax means but may not understand why you are doing what you are doing.
| 3 pts. | You have at least 3 useful comments (1 point each) | 
| [4] | All variables have descriptive names that indicate what they are used for | 
| -2 | Variable declarations uncommented | 
| -2 | Variable names do not indicate what the variable is used for | 
| 1 pt. | Your algorithm is straightforward and easy to follow. | 
| 1 pt. | Your algorithm is reasonably efficient, with no wasted computation or unused variables. | 
You will lose 5 points for having ANY statements outside of a function definition. There are only three exceptions to this rule:
For students using language features that were not covered in class, up to 5 points may be taken off if the principles of programming style are not adhered to when using these features. If you have any questions about what this means, ASK!