W2_A2_Assert type(b) == float

facing this error …please help

Please print(type(b)) to understand the difference between your return value and what the test expects.

cant change ,its already pre written

You can write additional print statements in the code cell of the function where you should implement the steps. Do remember to remove the debugging statements before submitting the notebook to the grader.

The assertion is telling you that your b value has the wrong type. So Balaji is asking you to print what type it actually is. What you will most likely find is that it is an integer. If you just assign the value 0 to b that doesn’t work, because 0 is an integer in python. In python 0 and 0. are not the same thing. The decimal point there makes the second value a float.

still getting the same error

Add print(type(b)) inside initialize_with_zeros() and then run the test. It should provide detail on failure. Keep in mind that if b was initialized to 0, it’s still an error since b is an integer and not a floating point type.