subject

You decide to buy some stocks for a certain price and then sell them at anotherprice. Write a program that determines whether or not the transaction wasprofitable. Here are the details:• Take three separate inputs: the number of shares, the purchaseprice of the stocks, and the sale price, in that order.• You purchase the number of stocks determined by the input.• When you purchase the stocks, you pay the price determined by the input.• You pay your stockbroker a commission of 3 percent on the amount paid forthe stocks.• Later, you sell the all of the stocks for the price determined by the input.• You pay your stockbroker another commission of 3 percent on the amountyou received for the stock. Your program should calculate your net gain or loss during this transaction andprint it in the following format:If your transaction was profitable (or if there was a net gain/loss of 0) print:"After the transaction, you made 300 dollars."(If, for example, you gained 300 dollars during the transaction.)If your transaction was not profitable, print:"After the transaction, you lost 300 dollars."(If, for example, you lost 300 dollars during the transaction.)Use string formatting.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 22:00, bbysl15
What is the name of the option in most presentation applications with which you can modify slide elements? 1. the option enables you to modify a slide element in most presentation applications.
Answers: 3
image
Computers and Technology, 23.06.2019 15:00, ryleerose255
Idon’t understand the double8 coding problem. it is java
Answers: 1
image
Computers and Technology, 23.06.2019 21:20, nicki76
In microsoft word, when you highlight existing text you want to replace, you're in              a.  advanced mode.    b.  automatic mode.    c.  basic mode.    d.  typeover mode
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, kayranicole1
What shows the web address of the page that is currently displayed in the workspace? status window toolbar location bar internet box
Answers: 1
You know the right answer?
You decide to buy some stocks for a certain price and then sell them at anotherprice. Write a progra...

Questions in other subjects:

Konu
Mathematics, 11.12.2019 05:31