Graded Practice Lab - Assertion Error

I’ve solved exercise # 04 many times even using the hints but got the assertion error every time. Please guide



You have an indentation problem here:

Also, please don’t post your code on the forum. If a mentor needs to see your code, we’ll contact you with instructions.

Hi TMosh!
Thanks for replying to my post. This block running ok but the next block in which unit test code to check the code wasn’t running and give the assertion error.

“Running OK” and “giving the correct results” are two different concepts.

I understand but it gives the same error. Can you please check error message as I posted on Image and guide me so that I can complete my certificate.
Thanks

The error message means your get_best_split() function doesn’t work correctly.

The test it is failing has these conditions:

You can temporarily add that code to your notebook, if you want to add some print() statements for debugging. Replace the text “target” with “get_best_split”, so it will call your function for testing.