CS 115 Project 2 FULL Grading Sheet


Correctness (65 points)

Initial screen (15 points)

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

Mouse clicks and voting errors (20 points)

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.

Candidate totals (30 points)

ActionNew totalsChange to state list
Clinton wins WAClinton: 12
Trump: 0
WA removed
Clinton wins orClinton: 19
Trump: 0
OR removed
Clinton wins CaClinton: 74
Trump: 0
CA removed
Trump wins aKClinton: 74
Trump: 3
AK removed
Clinton wins HIClinton: 78
Trump: 3
HI removed
Trump wins azClinton: 78
Trump: 14
AZ removed
Clinton wins NvClinton: 84
Trump: 14
NV removed
Trump wins uTClinton: 84
Trump: 20
UT removed
Trump wins IDClinton: 84
Trump: 24
ID removed
Trump wins MTClinton: 84
Trump: 27
MT removed
Trump wins WYClinton: 84
Trump: 30
WY removed
Clinton wins COClinton: 93
Trump: 30
CO removed
Clinton wins NMClinton: 98
Trump: 30
NM removed
Trump wins TXClinton: 98
Trump: 68
TX removed
Trump wins OKClinton: 98
Trump: 75
OK removed
Trump wins KSClinton: 98
Trump: 81
KS removed
Trump wins NEClinton: 98
Trump: 86
NE removed
Trump wins SDClinton: 98
Trump: 89
SD removed
Trump wins NDClinton: 98
Trump: 92
ND removed
Clinton wins MNClinton: 108
Trump: 92
MN removed
Clinton wins IAClinton: 114
Trump: 92
IA removed
Trump wins MOClinton: 114
Trump: 102
MO removed
Trump wins ARClinton: 114
Trump: 108
AR removed
Trump wins LAClinton: 114
Trump: 116
LA removed
Trump wins MSClinton: 114
Trump: 122
MS removed
Clinton wins ILClinton: 134
Trump: 122
IL removed
Clinton wins MIClinton: 150
Trump: 122
MI removed
Trump wins INClinton: 150
Trump: 133
IN removed
Clinton wins OHClinton: 168
Trump: 133
OH removed
Trump wins WVClinton: 168
Trump: 138
WV removed
Clinton wins PAClinton: 188
Trump: 138
PA removed
Clinton wins NYClinton: 217
Trump: 138
NY removed
Clinton wins MAClinton: 228
Trump: 138
MA removed
Clinton wins NJClinton: 242
Trump: 138
NJ removed
Trump wins TXClinton: 242
Trump: 138
none
Clinton wins xxClinton: 242
Trump: 138
none
Clinton wins FLClinton: 271
Trump: 138
none; Clinton wins

Points are subtracted for the following errors:

-3 Output sequence is not same as above
-8Displayed state list is never updated
-5Circling the winner and/or crossing out the loser does not work
-5State input is not case-insensitive
-3States are removed from the list if the user types the state name and then clicks outside the candidate pictures
-3Window closes immediately after circling winner and crossing out loser
-3 Votes are not added correctly

 

Programming Style (25 points)

Docstring (3 points)

[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.
-1Missing name
-1Missing or wrong course and/or assignment
-1Missing or wrong description

Usage of functions (5 points)

[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.
-1Minor lapses
-3Major flaws
-5Program does not have student-written functions

Function parameters and return values (5 points)

[5]Functions have no more parameters than necessary to do their jobs. Return values are used appropriately.
-1Minor flaws
-3Major flaws
-5Program does not have student-written functions

Function documentation (3 points)

[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.
-1Minor lapses
-2Some functions do not have comments, or comments do not contain the required info
-3Most functions do not have comments

Other documentation (3 points)

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)

Variable declarations and naming (4 points)

[4]All variables have descriptive names that indicate what they are used for
-2Variable declarations uncommented
-2Variable names do not indicate what the variable is used for

Algorithm (2 points)

1 pt.Your algorithm is straightforward and easy to follow.
1 pt.Your algorithm is reasonably efficient, with no wasted computation or unused variables.

Catchall

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!