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
lianna [129]
3 years ago
9

Write a program with a method computeCommission which takes a double that is the salesAmount and returns the commissions for sal

es from $10,000 to $100,000 in increments of $5,000. Commissions are calculated by one of two formulas depending on the amount:a. A sale up to $50,000, 8 percent for the first $5,000 and 10 percent of the remainderb. A sale over $50,000, 9 percent for the first $5,000 and 12 percent of the remainderE

Computers and Technology
1 answer:
miv72 [106K]3 years ago
4 0

Answer:

Explanation:

def computeCommission(salesAmount):

   commission=0

   if salesAmount <= 50000:

       commission = 5000*0.08 + (salesAmount-5000)*0.1

   elif salesAmount > 50000:

       commission = 5000*0.09 + (salesAmount-5000)*0.12

   return commission

print("commission for 45000 : "+str(computeCommission(45000)))

print("commission for 54000 : "+str(computeCommission(54000)))

You might be interested in
True or false: pinhole cameras can be outfitted with very accurate viewfinders
arsen [322]

Answer:

true

Explanation:

4 0
3 years ago
Read 2 more answers
For each of the following memory accesses indicate if it will be a cache hit or miss when carried out in sequence as listed. Als
nika2105 [10]

Answer:

Explanation:

Operation Address Hit? Read Value

Read 0x834 No Unknown

Write 0x836 Yes (not applicable)

Read 0xFFD Yes CO

6 0
3 years ago
"The correct syntax for passing an array as an argument to a method when a method is called and an array is passed to it is: "
Monica [59]

Question:

"The correct syntax for passing an array as an argument to a method when a method is called and an array is passed to it is: "

A) a[0]..a[a.length]

B) a()

C) a

D) a[]  

Answer:

The correct answer is A.

An example is given in the attachment.

Cheers!

4 0
3 years ago
Supplementary content SC is usually an important part of a webpage (but is not required for a page to receive a high or even hig
vredina [299]

Answer:

True

Explanation:

In a web page, there are two categories of content, they are, the main content and the supplementary content.

The main content holds the needed information of the web page and changes from page to page, while the supplementary content, as the name implies, supports the quality of the main content. It content can be duplicated in multiple pages and does not need a high rating to promote the quality of a web page.

6 0
3 years ago
Given the integer variables x, y, and z, write a fragment of code that assigns the smallest of x, y, and z to another integer va
padilas [110]

Answer:

The code to this question as follows:

Code:

if(x < y) //if block that check value of x less then value of y

{

if(x<z) // inner if block that check value of x less then value of z

{

min = x;  //assign value of x in min variable

}

else // inner else block when condition is false

{

min = z;  //assign value of z in min variable

}

}

else //outer else block

{

if(y<z) //if block to check value of variable y is less then value of z

{

min = y;  //assign value of y in min variable

}

else //else block

{

min = z;  //assign value of z in min variable

}

}

Explanation:

In the given question it is defined, that an integer variable " x, y,z, and min" is declared, in which variable "x,y, and z" value is defined, and the variable is used to assign a big value.

  • To check the biggest value we use the if-else statement in which, and if block check value of x is less than then the value of y if this condition is true so, inside this another if block declares, that will check if the value of x is less then z. if this is true, it will assign the value of x in min variable else it will assign the value of z in min.
  • In the outer else part, another conditional block has used, that checks if the value of y is less than then the value of z if it is true, it assigns the value of y in min else it will assign the value of z in min.
8 0
3 years ago
Other questions:
  • To defragment a disk means to ____. slow it down, diagnose problems with it, reorganize it, repair it
    8·1 answer
  • I will upvote....
    10·1 answer
  • when files on storage are scattered throughout different disks or different parts of a disk, what is it called
    10·1 answer
  • How did New York Governor Hugh Carey handle Sostre’s situation?
    9·2 answers
  • The data _____ component of a database management system (DBMS) is used to create and maintain the data dictionary. manipulation
    14·1 answer
  • Kamal plans to offer new, more favorable contracts to business customers who are now receiving a discount and use wireless servi
    7·1 answer
  • Write a function that dynamically allocates an array of integers. The function should accept an integer argument indicating the
    8·1 answer
  • Edit the following statement so it uses the constant named YEAR:
    5·1 answer
  • What symbol do we use to assign a value to a variable or constant in algorithms?
    12·1 answer
  • use the following binary search tree to answer the questions. a. how many comparisons are needed to search for ""2"" in this tre
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!