Description
- Write an iterative function to find the maximum in a list of integers. (do not use library function like max or sort.)
- Write a recursive function to reverse a string (do not use reverse library function).
- Write a recursive function to search a list of integers using binary search along with test cases. The function returns its index if the target of the search is in the list else return None. If the list is empty, it returns None.
Many people tend to focus on writing code as the singular activity of a programmer, but testing is one of the most important tasks that one can perform while programming. Proper testing provides a degree of confidence in your solution. Systematic testing helps you to discover and then fix bugs (i.e., debug). Writing high quality test cases can greatly simplify the tasks of both finding and fixing bugs and, as such, will save you time during development. However, testing does not guarantee that your program is correct.
For this part of the lab you will practice writing some simple test cases to gain experience with the unittest framework. I recommend watching the first 20 minutes or so of the following video if you are unfamiliar with testing in Python.
Using your editor/IDE of choice, open the lab1_test_cases.py file. This file defines, using code that we will treat as a boilerplate for now, a testing class with a single testing function.
In the test_expressions function you will see a single test case already provided. You must add additional test cases to verify that you binary search program is correct.
. (white box testing) For each test provide a comment that explains what it is testing.



