Question: ( 7 pts ) Write a function called stock _ advice ( ) that determines what to do with a particular stock from its purchase

(7 pts) Write a function called stock_advice() that determines what to do with a particular
stock from its purchase price and its current price. The first parameter is the purchase price and
the second is the current price.
The advice is "BUY" when the stock is up more than 30%.
The advice is "SELL" when the stock is down more than 50%.
For a stock that isnt changing very much (up more than 30 or down less than 50%), the
response should be "HOLD".

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!