Great Deal! Get Instant \$10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

# Write a program that: - include a class that accepts a list of numbers on instantiation . - in the class, write a method that recursively returns the upper bound (maximum) , and - write another method...

1 answer below Â»

Write a program that:

- include a class that accepts alistof numbers oninstantiation.

- in the class, write amethodthatrecursivelyreturns theupper bound (maximum), and

- write anothermethodthatiterativelyfind thelower bound (minimum)_.

- next create amain functionarea thatreads in the contents from a .CSVfileto create anarray or list data structure.That data structure should be passed tothe class you just developed.

Answered Same Day Jul 19, 2021

## Solution

Arun Shankar answered on Jul 20 2021
input_file.txt
3
6
1
8
5
9
10
2
main.py
class myClass:
def __init__(self,contents):
self.contents = contents
def upper_bound_helper(self, i, cu
):
if(i==len(self.contents)-1):
return cu
if(cu
self.contents[i]):
return self.upper_bound_helper(i+1,cu
)
...
SOLUTION.PDF