C1_W3_Logistic_Regression: Machine Learning Specialisation

Q1. For my code (for compute_cost), Cost at initial w (zeros): 1.386 is just double of the expected value. If I divide by 2m then results for non-zero w& b again come wrong. Could you identify the mistake? code & implements written below.
Q2. In case of compute_gradient, results are out of scale in comparison to expected values. Please help me find mistake. code & implements written below.

Hey @anand_kumar4,
Welcome to the community. Posting code publicly is against the community guidelines, so I am gonna let you know where you are going wrong in DM, and then remove these code samples from here.