Fixed potential zero division with a divisor check. Added an addition…

...assert (see the comment above the assert). Fixed late submission penalty calculation.