Input values • Enter the wages: 80000 • Entrer the taxable interest: 0 • Enter unemplyment compensation : 500 • Enter status (dependent, single, or married ):married Enter withheld amount :12000 Expected output Gross income: $80,500 Deduction : $24,000 Taxable income: $56,500 Federal tax: $6,380 Tax due: $-5,620
Input values • Enter the wages: 80000 • Entrer the taxable interest: 0 • Enter unemplyment compensation : 500 • Enter status (dependent, single, or married ):married Enter withheld amount :12000 Expected output Gross income: $80,500 Deduction : $24,000 Taxable income: $56,500 Federal tax: $6,380 Tax due: $-5,620
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter16: Searching, Sorting And Vector Type
Section: Chapter Questions
Problem 20PE
Related questions
Question
practice python part 3
![Input values
• Enter the wages: 80000
• Entrer the taxable interest: 0
• Enter unemplyment compensation : 500
Enter status (dependent, single, or married ):married
• Enter withheld amount :12000
Expected output
Gross income: $80,500
Deduction : $24,000
Taxable income: $56,500
Federal tax: $6,380
Tax due: $-5,620](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F8b1c52f2-d57a-467c-a59e-fa846971c0b5%2Fee7ee664-f248-47a3-8438-c68c0218dc9c%2Fuu3wcib_processed.png&w=3840&q=75)
Transcribed Image Text:Input values
• Enter the wages: 80000
• Entrer the taxable interest: 0
• Enter unemplyment compensation : 500
Enter status (dependent, single, or married ):married
• Enter withheld amount :12000
Expected output
Gross income: $80,500
Deduction : $24,000
Taxable income: $56,500
Federal tax: $6,380
Tax due: $-5,620
![Practice Python Part 3
**P3: Write a program to calculate income tax owed given wages, taxable interest, unemployment compensation, status (dependent, single, or married), and
taxes withheld. Dollar amounts are displayed as integers with comma separators.
create tax_module using following functons
• def calc_gross_income(wages, interest, unemployment)
• Calculate the calc_gross_income() that is the sum of wages, interest, and unemployment. Convert any negative values to positive before summing to
correct potential input errors. Return the gross income
• def get_deduction(status)
• Complete the get_deduction() function. Return the deduction amount based on status: dependent = 6000, single = 12000, or married-24000. Return
deduction
• def calc_taxable(gross_income, deduction)
Complete the calc_taxable() function. Calculate taxable amount (gross/-income - deduction). Set taxable to zero if calculation results in negative valu
Return taxable_value
def calc_tax(status, taxable)
• Complete the calc_tax() function. Calculate tax amount based on status and taxable income (see tables below). Tax amount should be stored initially
as a double,then rounded to the nearest whole number using round()
• def calc_tax_due(tax, withheld)
. Complete the calc_tax_due() function. Set withheld parameter to zero if negative to correct potential input error. Calculate and return amount of tax
due (tax-withheld)
main program import the module tax_module.py
• Within the main portion of the code, input the wages, taxable interest, unemployment compensation, status (dependent,single, and married), and
taxes withheld.
Income
$0-$10,000
$10,001 - $40,000
$40,001 - $85,000
over $85,000
Income
$0-$20,000
$20,001 - $80,000
over $80,000
Tax for Dependent or Single Filers
10% of the income
$1,000+ 12% of the amount over $10,000
$4,600 +22% of the amount over $40,000
$14,500 + 24% of the amount over $85,000
Tax for Married Filers
10% of the income
$2,000+12% of the amount over
$20,000
$9,200 + 22% of the amount over $80,000](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F8b1c52f2-d57a-467c-a59e-fa846971c0b5%2Fee7ee664-f248-47a3-8438-c68c0218dc9c%2Fgh64i9_processed.png&w=3840&q=75)
Transcribed Image Text:Practice Python Part 3
**P3: Write a program to calculate income tax owed given wages, taxable interest, unemployment compensation, status (dependent, single, or married), and
taxes withheld. Dollar amounts are displayed as integers with comma separators.
create tax_module using following functons
• def calc_gross_income(wages, interest, unemployment)
• Calculate the calc_gross_income() that is the sum of wages, interest, and unemployment. Convert any negative values to positive before summing to
correct potential input errors. Return the gross income
• def get_deduction(status)
• Complete the get_deduction() function. Return the deduction amount based on status: dependent = 6000, single = 12000, or married-24000. Return
deduction
• def calc_taxable(gross_income, deduction)
Complete the calc_taxable() function. Calculate taxable amount (gross/-income - deduction). Set taxable to zero if calculation results in negative valu
Return taxable_value
def calc_tax(status, taxable)
• Complete the calc_tax() function. Calculate tax amount based on status and taxable income (see tables below). Tax amount should be stored initially
as a double,then rounded to the nearest whole number using round()
• def calc_tax_due(tax, withheld)
. Complete the calc_tax_due() function. Set withheld parameter to zero if negative to correct potential input error. Calculate and return amount of tax
due (tax-withheld)
main program import the module tax_module.py
• Within the main portion of the code, input the wages, taxable interest, unemployment compensation, status (dependent,single, and married), and
taxes withheld.
Income
$0-$10,000
$10,001 - $40,000
$40,001 - $85,000
over $85,000
Income
$0-$20,000
$20,001 - $80,000
over $80,000
Tax for Dependent or Single Filers
10% of the income
$1,000+ 12% of the amount over $10,000
$4,600 +22% of the amount over $40,000
$14,500 + 24% of the amount over $85,000
Tax for Married Filers
10% of the income
$2,000+12% of the amount over
$20,000
$9,200 + 22% of the amount over $80,000
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning