Closed mistryrohan closed 1 year ago
For Q6, why would it be 0.538? I assumed "provide 3 decimal places rounding up" means to round the last place to the next highest one, no matter the following digits.
Also a fair point I guess it's just how you interpret it. I was thinking it meant round up if like 1.234x if x >= 5
Found the issue with why student tests weren't available: the "Tokens available on" in the automated settings was set to a date in the future...
I'll look into the other issues momentarily.
import numpy as np
and then used assert Q5 == np.round(0.6925960637300843,3)
assert Q6 == (0.700, np.round(0.031746,3), np.round(0.538462,3))
which agreed with LucieSo we'll go with rounding as provided by
np.round
. This will show in the errors if students get it wrong, and they can correct it if they wish at that point; although, the TAs shouldn't be marking off points based on smaller errors like this.
But I did have the previous solution file (with the asserts) downloaded before the new HW2 was committed and found 2 potential issues:
(d[(d.Age>=25)&(d.Age<=40)].Survived=='Dead').mean()
"The solution is 0.6925960637300843 so we should be asserting 0.693
(d.Survived[d.Paid>50]=="Dead").groupby(d.Man_Woman_or_Child).mean()
'The value for children is 0.538462 so we should be asserting (0.700, .032, 0.538)