answer.
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
vitfil [10]
2 years ago
12

Python Homework

Engineering
1 answer:
DerKrebs [107]2 years ago
5 0

Answer:

  1. TAX_RATE = 0.20
  2. STANDARD_DEDUCTION = 10000.0
  3. DEPENDENT_DEDUCTION = 3000.0
  4. # Request the inputs
  5. grossIncome = float(input("Enter the gross income: "))
  6. numDependents = int(input("Enter the number of dependents: "))
  7. # Compute the income tax
  8. taxableIncome = grossIncome - STANDARD_DEDUCTION - \
  9. DEPENDENT_DEDUCTION * numDependents
  10. incomeTax = taxableIncome * TAX_RATE
  11. # Display the income tax
  12. print("The income tax is $" + str(round(incomeTax,2)))

Explanation:

We can use round function to enable the program to output number with two digits of precision.

The round function will take two inputs, which is the value intended to be rounded and the number of digits of precision. If we set 2 as second input, the round function will round the incomeTax to two decimal places. The round function has to be enclosed within the str function so that the rounded value will be converted to a string and joined with the another string to display the complete a sentence of income tax info.

You might be interested in
A ________ is only achieved through control and involves a specific change in one event (dependent variable) that can reliably b
prohojiy [21]

Answer:

Functional Relationship

Explanation:

A functional relationship is only achieved through control and involves a specific change in one event (dependent variable) that can reliably be produced by specific manipulations of another event (independent variable), and the change in the dependent variable is unlikely to be the result of other extraneous factors (confounding variables

6 0
2 years ago
A heat recovery device involves transferring energy from the hot flue gases passing through an annular region to pressurized wat
Elina [12.6K]

Answer:

See explaination

Explanation:

Please kindly check attachment for the step by step solution of the given problem.

4 0
2 years ago
g The function below takes a single string parameter: sentence. Complete the function to return everything but the middle 10 cha
ale4655 [162]

Answer:

  1. def processString(sentence):
  2.    middle = len(sentence) // 2
  3.    output = sentence[0: middle - 5] + sentence[middle+5:]
  4.    return output
  5. print(processString("I have a dream"))

Explanation:

Create a function processString that take sentence as input paratemer (Line 1).

Next create a variable middle to hold the value of middle index of sentence string (Line 2)

Build the output string by slicing the input sentence from first character to character middle - 5th and from middle + 5th till the end of the string (Line 3).

Test the function using a sample sentence and we shall get the output "I am"

4 0
2 years ago
Evan notices a small fire in his workplace. Since the fire is small and the atmosphere is not smoky he decides to fight the fire
Norma-Jean [14]

Answer:

not calling the firemean

Explanation:

7 0
2 years ago
At an impaired driver checkpoint, the time required to conduct the impairment test varies (according to an exponential distribut
professor190 [17]

Answer:

Option (d) 2 min/veh

Explanation:

Data provided in the question:

Average time required = 60 seconds

Therefore,

The maximum capacity that can be accommodated on the system, μ = 60 veh/hr

Average Arrival rate, λ = 30 vehicles per hour

Now,

The average time spent by the vehicle is given as

⇒ \frac{1}{\mu(1-\frac{\lambda}{\mu})}

thus,

on substituting the respective values, we get

Average time spent by the vehicle = \frac{1}{60(1-\frac{30}{60})}

or

Average time spent by the vehicle = \frac{1}{60(1-0.5)}

or

Average time spent by the vehicle = \frac{1}{60(0.5)}

or

Average time spent by the vehicle = \frac{1}{30} hr/veh

or

Average time spent by the vehicle = \frac{1}{30}\times60 min/veh

[ 1 hour = 60 minutes]

thus,

Average time spent by the vehicle = 2 min/veh

Hence,

Option (d) 2 min/veh

7 0
2 years ago
Other questions:
  • You are working in a lab where RC circuits are used to delay the initiation of a process. One particular experiment involves an
    13·1 answer
  • A hydrogen-filled balloon to be used in high altitude atmosphere studies will eventually be 100 ft in diameter. At 150,000 ft, t
    7·1 answer
  • Water has a density of 1.94 slug/ft^3. What is the density expressed in SI units? Express the answer to three significant figure
    8·1 answer
  • A 0.9% solution of NaCl is considered isotonic to mammalian cells. what molar concentration is this?
    10·1 answer
  • A subway car leaves station A; it gains speed at the rate of 4 ft/s^2 for of until it has reached and then at the rate 6 then th
    8·1 answer
  • You are an electrician on the job. The electrical blueprint shows that eight 500-W lamps are to be installed on the same circuit
    11·1 answer
  • Two physical properties that have a major influence on the cracking of workpieces, tools, or dies during thermal cycling are the
    13·1 answer
  • A desktop computer is to be cooled by a fan whose flow rate is 0.34 m3/min. Determine the mass flow rate of air through the fan
    12·1 answer
  • The BARO sensor informs the PCM about changes in weather and ____________________.
    14·1 answer
  • Dalton needs to prepare a close-out report for his project. Which part of the close-out report would describe
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!