Timeline for Compute a students grade based on weight of assignments
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 23, 2017 at 0:24 | history | edited | jonrsharpe | CC BY-SA 3.0 |
added 191 characters in body
|
Mar 22, 2017 at 22:28 | vote | accept | Adele | ||
Mar 22, 2017 at 11:38 | comment | added | jonrsharpe | @Graipher you're correct, but given the integer divisions in the rest of the OP's code I assumed they'd have been bitten by that already if they were using 2.x! | |
Mar 22, 2017 at 8:27 | comment | added | Graipher |
Note that in Python 2.x, your average function has a small bug. If sum(scores) is an integer, it will do integer division (because len(scores) is also an integer), instead of float division. Just wrap either the sum or the len in a float call to avoid it.
|
|
Mar 22, 2017 at 5:49 | history | answered | jonrsharpe | CC BY-SA 3.0 |