Pergunta de entrevista da empresa NCDEX

Write code for bisection method?