Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

We Want to write a function called stockadvice tha... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Smith and Roberson Business Law

Authors: Richard A. Mann, Barry S. Roberts

15th Edition

1285141903, 1285141903, 9781285141909, 978-0538473637

More Books

Students also viewed these Programming questions

Question

Define line and staff authority

Answered: 1 week ago

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago