In [ ]:
In [ ]:
import numpy as np
np.testing.assert_allclose(27.0, cube(3.0))
np.testing.assert_allclose(125.0, cube(5.0))
np.testing.assert_allclose(1000.0, cube(10.0))
In [ ]:
In [ ]:
import numpy as np
np.testing.assert_allclose(0.0, remainder(100, 2))
np.testing.assert_allclose(6.0, remainder(123, 39))
np.testing.assert_allclose(3.0, remainder(987, 4))
In [ ]:
In [ ]:
assert not is_even(3)
assert not is_even(123456789)
assert is_even(42)
In [ ]:
In [ ]:
import numpy as np
assert 3 == len(add_to_list([1, 2, 3], 5))
np.testing.assert_allclose([6, 7, 8], add_to_list([1, 2, 3], 5))
np.testing.assert_allclose([866.7, 18.75, 35.9356, 12.5], add_to_list([854.2, 6.25, 23.4356, 0.0], 12.5))
In [ ]:
In [ ]:
assert 5 == minimum([10, 15, 5, 20])
assert 100 == minimum([100, 200, 300, 400, 500])
assert 42 == minimum([96456, 454, 2342, 234, 647, 67, 42])