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
Lubov Fominskaja [6]
3 years ago
7

The tax calculator program of the case study outputs a floating-point number that might show more than two digits of precision.

Computers and Technology
1 answer:
Aneli [31]3 years ago
4 0

Answer:

TAX_RATE = 0.20

STANDART_DEDUCTION = 10000.0

DEPENDENT_DEDUCTION = 3000.0

gross_income = float(input("Enter the gross income: "))

number_of_dependents = int(input("Enter the number of dependents: "))

income = gross_income - STANDART_DEDUCTION - (DEPENDENT_DEDUCTION * number_of_dependents)

tax = income * TAX_RATE

print ("The income tax is $" + str(round(tax, 2)))

Explanation:

Define the <em>constants</em>

Ask user to enter the <em>gross income</em> and <em>number of dependents</em>

Calculate the <em>income</em> using formula (income = gross_income - STANDART_DEDUCTION - (DEPENDENT_DEDUCTION * number_of_dependents))

Calculate the <em>tax</em>

Print the <em>tax</em>

<em />

round(number, number of digits) -> This is the general usage of the <em>round</em> function in Python.

Since we need <u>two digits of precision</u>, we need to modify the program as str(<u>round(incomeTax, 2</u>)).

You might be interested in
What is decision tree?​
irinina [24]

Answer:

A decision tree is a decision support tool that uses a tree-like graph or model of decisions and their possible consequences, including chance event outcomes, resource costs, and utility. It is one way to display an algorithm that only contains conditional control statements.

Explanation:

6 0
4 years ago
Read 2 more answers
One interesting application of computers is to display graphs and bar charts. Write an application that reads five numbersbetwee
mojhsa [17]

Answer:

this solution was written in c programming language

Explanation:

#include <stdio.h>

int main(void)

{

int i, j, number;

/* ask user for numbers */

printf("Enter 5 numbers between 1 and 30: ");

/* repeat 5 times */

for (i = 0; i < 5; i++)

{

 /* read in number */

 scanf("%d", &number);

 /* print that number of stars */

 for (j = 0; j < number; j++)  

 {

  printf("*");

 }

 /* bring cursor to next line */  

 printf("\n");

}

return 0;

}

8 0
3 years ago
**HELP ME PLS**
melisa1 [442]

The true statement is the report is grouped only because it gives information about employees by number of years of employment.

<h3>What is a group report?</h3>

Group reporting is made up of consolidation method and analytical reports and it gives information on the output of a firm.

Note that since there are different ranges of employment years, the report need to be grouped and as such, The true statement is the report is grouped only because it gives information about employees by number of years of employment.

Learn more about group report from

brainly.com/question/13628349

#SPJ1

4 0
2 years ago
In the header, your last name and the page number are typed even with the ______ margin. *
Brrunno [24]

Answer: Right

Explanation:

The Modern Language Association provides  a Style Manual that presents  a guide to help individuals  format academic papers and literary works. MLA is widely used because of its simplicity and easy to use. An MLA-style page header includes your (the  author's) last name and the page number to be  on the right margin.

8 0
3 years ago
Read 2 more answers
Write a program that takes a sentence as input and prints all the vowels in the sentence. Your program must use a for loop. Samp
oksian1 [2.3K]

Answer:

Python.

Explanation:

// Ask user for input string and store it to variable

sentence = input("Enter a sentence: ")

// Loop through each character in string

for character in sentence:

   //  Check for vowel

  if character == 'a' or character == 'e' or character == 'i' or character == 'o' or character == 'u':

       // print the vowel

       print(letter)

5 0
3 years ago
Other questions:
  • A video conferencing application isn't working due to a Domain Name System (DNS) port error. Which record requires modification
    15·1 answer
  • Dams provide what kind of energy ?
    5·2 answers
  • Write a class called Counter that represents a simple tally counter, which might be used to count people as they enter a room. T
    9·1 answer
  • Write a class Example() such that it has a method that gives the difference between the size of strings when the '-' (subtractio
    6·1 answer
  • Matt is a senior developer for Cyber Protect, a company that helps secure management information systems. Matt's new task is to
    8·1 answer
  • . Describe a way to simplify a complex problem.
    8·1 answer
  • if you were determining what was expected of you simply by looking at media, what messages would you take away?
    8·2 answers
  • How can you change the block input so that the sprite moves in the opposite direction?
    12·1 answer
  • Why is this happening when I already uploaded files to my drive?
    13·1 answer
  • Which code snippet could be used to print the following series?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!