Root Finding Algorithm Python Coursera