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
IRINA_888 [86]
3 years ago
9

An application needs to calculate sales tax for purchases. You decide to simplify the code by putting the sales tax calculation

in a function. The returned value from the function is then added to the Subtotal, and the result is stored in the decTotal variable. Which of the following statements will call the GetSalesTax function and return a value to be used in the Total calculation?a.) decTotal = decSubtotal + GetSalesTax()b.) decSubtotal + GetSalesTax(decSubtotal)c.) decTotal = decSubtotal + GetSalesTax(decSubtotal)d.) decTotal = decSubtotal + GetSalesTax(decSubtotal As Decimal)
Computers and Technology
1 answer:
vodka [1.7K]3 years ago
4 0

Answer:

Option C: decTotal = decSubtotal + GetSalesTax(decSubtotal)

Explanation:

To get sales tax, we need a function can process a subtotal amount and return the tax values. By presuming<em> GetSalesTax()</em> is a function that will return a tax value, this function will expect decSubtotal as the input parameter to the function. Otherwise, there will be no values processed in the function.

The statement  <em>decTotal = decSubtotal + GetSalesTax(decSubtotal)  </em>will invoke function<em> GetSalesTax()</em> by passing<em> decSubtotal </em>as argument. Next the return value of the function will be added with decSubtotal and the summation amount assigned to the variable <em>decTotal</em>.

You might be interested in
Write a program that (a) generates a vector with 20 random integer elements with integers between -29 and 30, (b) replaces all t
Ghella [55]

Answer:

import random

randomlist = []

for i in range(0,20):

n = random.randint(-29,30)

if n < 0 :

n = 100

randomlist.append(n)

print(randomlist)

Explanation:

The random module is first imported as it takes care of random. Number generation.

An empty list called randomliay is created to hold the generated random integers.

Using a for loop, we specify the range of random numbers we want.

Inside the for loop ; we attach our generated random integer which will be in the range (-29 to 30) in a variable n

For each n value generated, if the value is less than 0( it is negative, since all the values are integers), replace the value with 100.

5 0
2 years ago
The ability to anticipate and determine upcoming driving hazards and conditions are adversely affected by stress.
dybincka [34]
It can be stress or drinking, drugs, or anything of the sort.
6 0
3 years ago
PLEASE HELP ASAP!!!!!!!!!!!
Bingel [31]

Answer:

True

Explanation:

3 0
3 years ago
Read 2 more answers
Which folder(s) are commonly used in the Navigation Pane of Outlook? Check all that apply.
tensa zangetsu [6.8K]

The Navigation Pane in Outlook is used to switch between the different areas of Outlook,such as Mail, Calendar, Contacts, Tasks, and Notes., the Navigation Pane displays the folders within the view you are working with. The following folders are commonly used in the Navigation Pane in Outlook:

Inbox

Sent Items

Deleted Items

They are most commonly included in the Favorites.

6 0
3 years ago
Brainless is one the way if you help
V125BC [204]

Answer:

1. x - 6

2. p - ? = 7

i chose these equations because

a number - 6 = the weight of your backpack.

p - an unknown number without a substitute variable = slices of bread left.

3 0
2 years ago
Other questions:
  • Knowing the meaning of the acronym WYSIWYG can be most helpful to you when you
    14·1 answer
  • Coloumn1; Criteria1: Average of best three marks (CA); CA&gt;=40
    13·1 answer
  • Please help i really need to turn this in already
    6·1 answer
  • Which method allows a computer to react accordingly when it requests data from a server and the server takes too long to respond
    5·1 answer
  • Which statement accurately describes DTP programs?
    11·1 answer
  • Complete the sentence to identify advantages of top-down programming design. Choose all that apply.
    15·2 answers
  • What is a GUI?
    11·1 answer
  • PLEASE HELP ASAP<br> Which technology encrypts traffic between a web browser and a website?
    10·2 answers
  • The Binary Search algorithm works by testing a mid-point, then eliminating half of the list.
    8·1 answer
  • Question 1 (1 point)
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!