The code representing my solution to a Codedex activity that required the following:
Create a stock_analysis.py program that implements three functions:
price_at(x) that finds the price on a given day x.
max_price(a, b) that finds the maximum price from day a to day b.
min_price(a, b) that finds the minimum price from day a to day b.
The parameters of the days will be in the range of 1 to 20 (since that is the period for the stock we are analyzing).
Make sure to call each function to test if your functions work correctly!
The "Stonks" activity in the #Codedex Beginners #Python course nearly did me in. I thought I was pretty smart knowing how to get around the zero-based indexing with the first function. But boy oh boy, did I get all twisted trying to figure out the second & third.
Finally did it though!