Add code that finds the smallest and largest readings in the…