UNDERSTOOD THE QUESTION AND UNDERSTOOD THE SOLUTION

I understood the question and solution but when i trying to write the code its not correct can u please provide the code of the answer

this is of numpy ml interview question

Hello @Ashmeet-Singh-1289054874617699, can you pls tell what are you doing ?? What have you written as the code ?