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
FrozenT [24]
3 years ago
13

When the function below is called with 1 dependent and $400 as grossPay, what value is returned?

Computers and Technology
1 answer:
stepladder [879]3 years ago
8 0

Answer:

b. 80.0

Explanation:

Given

dependent = 1

grossPay = \$400

Required

Determine the returned value

The following condition is true for: dependent = 1

<em>else if (dependnets == 1) </em>

<em>withheldAmount = 0.2;</em>

The returned value is calculated as:

withheldAmount = grossPay * withheldAmount;

This gives:

withheldAmount = 400 * 0.2

withheldAmount = 80.0

<em>Hence, the returned value is 80.0</em>

You might be interested in
What are the three parts of a Function
r-ruslan [8.4K]

Answer:

the 3 parts of a function are as follows

1. name

2. return

3.void

6 0
3 years ago
What is the capital of Peru?<br> A. <br> Brazil<br> B. <br> Lima<br> C. <br> Inca
hichkok12 [17]
B. Lima-------------
8 0
3 years ago
Read 2 more answers
How do I learn coding? Python
pickupchik [31]

first learn the basics about the computer than just slowing move into it you feel?

5 0
3 years ago
Read 2 more answers
True or false, USBs are slower than RAM.
Zina [86]

Answer:

False

Explanation:

6 0
3 years ago
How many times does the following loop execute?int upperCaseLetters = 0;String str = "abcdEfghI";boolean found = false;for (int
damaskus [11]

Answer:

Five times

Explanation:

Given the codes as follows:

  1.        int upperCaseLetters = 0;
  2.        String str = "abcdEfghI";
  3.        boolean found = false;
  4.        for (int i = 0; i < str.length() && !found; i++)
  5.        {
  6.            char ch = str.charAt(i);
  7.            if (Character.isUpperCase(ch))
  8.            {
  9.                found = true;
  10.            }
  11.        }

The for loop will stop when the first uppercase letter is found in the str. This condition is set in the for loop condition ( i < str.length() && !found)

Since the the first upper case letter is the fifth character in the given str, the for loop will run for five rounds. In the fifth round the condition in the if statement (Line 9) will be evaluated to true and then set the true value to found variable (Line 11). This will terminate the loop in the next iteration.

7 0
3 years ago
Other questions:
  • HELP PLEASE
    7·2 answers
  • A list of the slides in a presentation is found here.
    7·2 answers
  • Write a single if-test using Boolean operators and relaional operators to determine if a double variable x is between zero (excl
    11·1 answer
  • What file extension is used to name a compressed folder
    10·1 answer
  • a sign is to be hung from the end of a thin pole, and the pole supported by a single cable. your design firm brainstorms the six
    13·1 answer
  • Which of the following blocks allows a user to enter text in a text box in App Inventor?
    6·1 answer
  • Can anyone give me $2 (Reddem code/Promo Code)​
    15·2 answers
  • 1. Pasar los siguientes ejercicios a diagrama de bloque
    11·1 answer
  • Electrical data suitable for transmission is called a(n)
    5·1 answer
  • Which UPPER function is written so that all text in cell B4 will be capitalized? O=UPPER(B4) O=UPPER[B4] O UPPER B4 O=UPPER
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!