C1 W2 Exercise 4 AssertationError


Can someone help me? Thank you!

Hi @Ancilica , welcome to the DLS community, and I hope you are enjoying the course.

The above actually is actually something that occurs very often. The assertion error basically means that the program is expecting variable b to be of type float (numbers on both sides of the decimal). Since you initialized b as 0, the program thinks that b is an integer. How can you fix this?

2 Likes

b = float(0)
Now it works! Thank for your support!

1 Like

@Ancilica great to see that you managed to fix it! Enjoy the rest of the course.

1 Like