Last month Joe purchased some stock in Acme Software, Inc. Here are the details of the purchase:
Two weeks later Joe sold the stock. Here are the details of the sale:
Write a program that displays the following information:
print("Last month Joe purchased some stock in Acme Software, Inc")
shares = 1000
print("The number of shares that Joe purchased :",shares)
perShare = 32.87
print("he paid $"+str(perShare)," per share")
paidShares = shares * perShare
print("total amount was paid by Joe on 1000 shares was : $"+ \
str(format(paidShares ,'.2f')))
brokerCommission1 = paidShares * .02
print("amount of commission joe paid when he bought the stock was : $" + \
str(format(brokerCommission1 , ',.2f')))
print("Two weeks later Joe sold the stock")
shareSold = 1000
print("The number of shares that Joe sold was :",shareSold)
perShare = 33.92
print("he sold $"+str(perShare),"per share")
totalAmountSold = shareSold * perShare
print("total amount was sold by Joe on 1000 shares was : $"+ \
str(format(totalAmountSold ,'.2f')))
brokerCommission2 = totalAmountSold * .02
print("amount of commission joe paid when he sold the stock was : $" + \
str(format(brokerCommission2 , ',.2f')))
balanceAmount = totalAmountSold - ( paidShares + \
brokerCommission1 + brokerCommission2 )
print("Amount of money Joe has left : $"+str(format(balanceAmount , ',.2f')))
if(balanceAmount > 0):
print("Joe made a profit")
else:
print("Joe lost his money ")