Question: Write a function called stock_advice () that determines what to do with a particular stock from its purchase price and its current price. The

Write a function called stock_advice () that determines what to do with a particular stock from its purchase

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 isn't changing very much (up more than 30 or down less than 50%), the response should be "HOLD". Example: stock_advice (250.09, 466.75)'BUY'|

Step by Step Solution

3.43 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

We Want to write a function called stockadvice tha... View full answer

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!