Type casting showing error

Week2 assignment 1 exercise 4 initializing variable.
AssertionError Traceback (most recent call last)
2 w, b = initialize_with_zeros(dim)
----> 4 assert type(b) == float
5 print ("w = " + str(w))
6 print ("b = " + str(b))

Show the above erro but i want to edit it unable to edit in notebook.

I don’t think learners can edit unit tests in the notebook.

Hey @Afsar_Khan , yes, so, I doubled checked, learners can’t edit unit test code blocks. So, if your test is failing then it means there’s a mistake in the exercise code block above.

And from the looks of it, you are declaring variable b as an integer. You need to declare it as a float. Look up on how to declare floats in python.

Yes, the issue has been solved I declared the variable as float and it’s ok now, Thanks alot

1 Like