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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
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
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
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Payback period
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education