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 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
Step: 1
We Want to write a function called stockadvice tha...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Smith and Roberson Business Law
Authors: Richard A. Mann, Barry S. Roberts
15th Edition
1285141903, 1285141903, 9781285141909, 978-0538473637
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App