Root Finding Function Python Example