1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nignag [31]
3 years ago
15

Last month Joe purchased some stock in Acme Software, Inc. Here are the details of the

Computers and Technology
1 answer:
fiasKO [112]3 years ago
5 0

Shares_Purchased = 0.0

Amt_PaidPerShare = 0.0

Commission_Percentage = 0.0

Paid_WithoutCommission = 0.0

Commission_Paid = 0.0

Total_Paid = 0.0

Shares_Sold = 0.0

Amt_SoldPerShare = 0.0

Sale_Amount = 0.0

Earned_WithoutCommission = 0.0

Commission_PaidSale = 0.0

Total_Earned = 0.0

ProfitNoProfit = 0.0

#calculation starts from here

Shares_Purchased = float(input("How many shares did you purchase? \n "

"enter in 0.0 form: "))

Amt_PaidPerShare = float(input("How much did you pay per share? \n"

"enter in 0.0 form: "))

Commission_Percentage = float(input("What percentage is your stockbroker \n"

"Charging per transaction? enter in 0.00 form: "))

Paid_WithoutCommission = Amt_PaidPerShare * Shares_Purchased

Commission_Paid = Paid_WithoutCommission * Commission_Percentage

TotalPaid = Commission_Paid + Paid_WithoutCommission

Shares_Sold = float(input("How many shares did you sell? \n "

"enter in 0.0 form: "))

Amt_SoldPerShare = float(input("How much did you sell each share for? \n"

"enter in 0.0 form: "))

Earned_WithoutCommission = Amt_SoldPerShare * Shares_Sold

Commission_PaidSale = Earned_WithoutCommission * Commission_Percentage

Total_Earned = Earned_WithoutCommission - Commission_PaidSale

ProfitNoProfit = Total_Earned - Total_Paid

#printing the output

print ("You paid the following for the shares:")

print (Paid_WithoutCommission)

print ("You paid the following in commissions to your stockbroker for the purchase:")

print (Commission_Paid)

print ("In total, you paid:")

print (Total_Paid)

print ("You sold your shares for the amount of:")

print (Earned_WithoutCommission)

print ("You paid the following in commissions to your stockbroker for the sale:")

print (Commission_PaidSale)

print ("In total, your revenue is: ")

print (Total_Earned)

if ProfitNoProfit > 0:

   print ("You have earned a profit of: %s." % ProfitNoProfit)

elif ProfitNoProfit == 0:

   print ("You have broken even")

else: print ("You have lost this amount: %s." % ProfitNoProfit)

You might be interested in
Question 1 of 10
mafiozo [28]
D. A programming language
6 0
3 years ago
You are writing an email to a potentional employer about a job opportunity. What can you do to make sure the email reflects your
Lina20 [59]
You want to use proper etiquette and be polite, do not call them by their first name and always refer to them as Mr., or Mrs. Use an extended vocabulary and do not talk about yourself.  If you have proper grammar, depending on the job, that can be seen as intelligence. And always use an appropriate closing that is respectful. Such as, Sincerely, John Doe.
4 0
4 years ago
Read 2 more answers
What can be used to visually represent information similar to a diagram
Assoli18 [71]
A vin diagram should help you lay it out

5 0
4 years ago
4.2 code need help plz someone 15 points if u help
Korolek [52]

def func():  

 total = 0

 while True:

   pet = input("What pet do you have? ")

   if pet == "rock":

     return

   total += 1

   print("You have a {} with a total of {} pet(s)".format(pet, total))

func()

We wrapped our code in a function so that whenever the user enters rock, we can simply return and exit the function. If you have any other questions, I'll do my best to answer them.

8 0
3 years ago
Write a full class definition for a class named Player, and containing the following members:
ANEK [815]

// making class

class Player {

// Data members

string name;

int score;

// Name setter

void setName(string str){

this.name = str;

}

// Score setter

void setScore(int num){

this.score = num;

}

// Score getter

int getScore(){

return score;

}

// Name getter

string getName(){

return name;

}

};

8 0
3 years ago
Other questions:
  • Parallel tangent and coincident are examples of what
    13·1 answer
  • What type of malicious software technology is used to monitor user behavior or gather information about the user, sometimes incl
    5·1 answer
  • Write a short program that uses a for loop to write the numbers 1 through 10 to a file
    11·1 answer
  • The paint 3D program is used for drawing picture true or false​
    10·2 answers
  • Use the function random.randint to write a program that rolls a 6-sided die 100 times, and prints out all of the rolls.
    8·1 answer
  • Given the code as follows: main() { int i = 3, n; float x; x = i; n = 8 % x; } What problem will occur? Group of answer choices
    12·1 answer
  • Public class Dog
    7·1 answer
  • What is one example of an emerging class of software
    12·1 answer
  • This question involves the creation and use of a spinner to generate random numbers in a game. a gamespinner object represents a
    8·1 answer
  • Two negative reviews and no positive reviews is enough to consider the website to have a negative reputation.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!