Course 4 ,week 1, Assignment 1, exercise 2

Sir, i am writing following code but i am still getting assertion error, that i need to cast output as float which i am doing. Kindly help. I have tried all trial and error to remove this error but stuck at this.

{moderator edit - solution code removed}

Please don’t create duplicate topics. See the reply here