A find functionΒΆ

Here is an implementation for the find method.




(ch08_run3)

Since we have now combined these two parts with a logical and, it is necessary for them both to be True to continue iterating. If one part fails, the condition fails and the iteration stops.

When the iteration stops, we simply ask a question to find out why and then return the proper value.

Next Section - Optional parameters