Assertion error for initialize with zeros function

I am getting an assertion for the function initialize with zeros . Although I implemented the code correctly …The error is due to immediate next code block that has a statement assert type(b)== float… The statement is part of the assignment code and it cannot be edited. How do I solve the issue

This is a common problem. If the test fails, that means you did not implement the code correctly. You need to start by understanding what the test failure is telling you. The assertion is telling you that b should not be an integer type. Just setting b = 0 will not work here. So how can you express “zero” as a floating point quantity in python? Maybe consider including a decimal point?

1 Like

Thank you so much for clearing my doubt !!