Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do in Python 3 IDE and write some comments Thanks Stock Transaction Program Last month Joe purchased some stock from Stock Trade. 1. Write

image text in transcribed
Please do in Python 3 IDE and write some comments
Thanks
Stock Transaction Program Last month Joe purchased some stock from Stock Trade. 1. Write a function(s) to allow the user to input the followings: . The name of the stock Number of shares Joe bought Stock purchase price Broker commission 2. Write function(s) to calculate: and: . Stock selling price The amount of money Joe paid for the stock (number of shares bought purchase price) The amount of commission Joe paid his broker when he bought the stock. (Amount he paid for stocks" commission in percent) . The amount that Jim sold the stock for. (number of shares selling price) . The amount of commission Joe paid his broker when he sold the stock. (Amount he sold shares commission in percent) Calculate the amount of money Joe had left when he sold the stock and paid his broker (both times). f this amount is positive, then Joe made a profit If the amount is negative, then Jim lost money Profitloss -(amount paid to buy stocks commission)-(amount for sold stocks- commission) 3. Write function(s) to display the following paid for the stock(s) that Joe had transacted (f Joe entered 5 sets of stocks transactions then output 5 sets of stocks). . The Name of the Stock The amount of money Joe paid for the stock (number of shares bought purchase price) .The amount of commission Joe paid his broker when he bought the stock (Amount he paid for stocks commission in percent) . The amount that Jim sold the stock for. (number of shares selling price) .The amount of commission Joe paid his broker when he sold the stock. (Amount he sold shares commission in percent) .Display the amount of money Joe had left when he sold the stock and paid his broker (both times). I this amount is positive, then Joe made a profit If the amount is negative, then Jim lost money Profitloss (amount paid to buy stocks+ commission)-(amount for sold stocks-commission) 4 Write the main) function to call the above functions For all your functions you must include type annotations Example of type annotation for multiple return values def function(vart:int, var2:int, var3 int)f str, float) (for this hw have at least 5 test cases) Some codes that do something #afunction can exist with no codes if you rade pass as are of code pass is just to demonstrate the returm values, #not required if you have pass above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

5. Discuss the key roles for training professionals.

Answered: 1 week ago