C1 Week 3 Exercise 3 calculating "compute_gradient"

Hello @Amer_Althiab
First of all, you have posted this under General Discussion. Move it to respective course and week so that you can get help.
Second, Posting code in public is against community guidelines. Delete your code. Post only error trace.
Third, Check the indentation of the code. To know more about indentation refer Indentation in Python (IndentationError: unexpected indent)