Question: PYTHON QUESTION Then write( handwritten ok) a simple python(python 3) program to simulate a simple stock transaction. Ask the user for the starting price per

PYTHON QUESTION

Then write( handwritten ok) a simple python(python 3) program to simulate a simple stock transaction.

Ask the user for the starting price per share of a stock.

starting_price = float(input("What is the starting price per share?: "))

Ask the user how many shares the user wants to buy and read into a variable called numShares.

Then you want to multiply those two variables to get cost. Then take cost multiplied by 1.10(this represents the commission for stock broker) .

Print this total cost out.

print(Total cost is ,totalcost)

Then ask the user to enter the ending price.

Then print out the profit by taking (ending price * number of shares)- total cost.

Print out the profit.

Done.

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 Databases Questions!