
v0.39: Grademe is back in your terminal.
Try the CLI betaRepair the average so an empty array returns 0 instead of dividing by zero.
September 1997. The USS Yorktown, a Navy cruiser running a Windows NT Smart Ship control system, takes a zero typed into a database field. A calculation divides by that zero, the error cascades through the propulsion software, and a billion dollar warship sits dead in the water, towed back to port. The whole ship was stopped by one unchecked denominator. Guard the division.
average({10,20,30}, 3)Expected result
20For your own tracking. Tests grade your code.
average({}, 0)Expected result
0average({1,2,3,4}, 4)Expected result
2Expected files
avg.cAllowed functions
None. Write every helper yourself.
