Tax Calculator program Introduction / Problem Statement Write a python program that calculate tax refund based on steps below, use only functions no objects. Step 1. Calculate the standard deduction....

1 answer below »
PFA


Tax Calculator program Introduction / Problem Statement Write a python program that calculate tax refund based on steps below, use only functions no objects. Step 1. Calculate the standard deduction. For this problem we are going to assume only two marital status positions. If you are single, you get a $12,200 standard deduction. If you filed married, you get a $24,400 standard deduction. Step 2. Calculate the adjusted gross income. To calculate your taxes owed, you take the wages and subtract the standard deductions. This gives you your adjusted gross income (AGI).  Step 3. Calculate the tax refund or taxes owed. You then use the tables below with the AGI to calculate the taxes.  If the taxes are greater than what was paid, you owe taxes. If the taxes were less, you get a refund. Example First Name = Kevin Last Name = Martin Total Wages = 50000 Taxes Paid = 30000 Marital Status = single Kevin Martin’s refund is going to be $25,658.00! Example First Name = Sarah Last Name = Hayland Total Wages = 25000 Taxes Paid = 1000 Marital Status = single Sarah Hayland still owes $342.00 in taxes!
Answered 4 days AfterMay 17, 2021

Answer To: Tax Calculator program Introduction / Problem Statement Write a python program that calculate tax...

Shashank answered on May 21 2021
146 Votes
tax_calculation.py
def tax_calculation(f_name,L_name,marital_status,wages,tax_paid):
# Condition for checking the Marital Status
if marital_status.replace(" ", "") == 'single': #If single then standard Deduc
tion is 12200
std_deduction=12200
# replace is used for removeing space
elif marital_status.replace(" ", "") == 'married': #If Married then standard Deduction is 24400
std_deduction = 24400
else:
std_deduction=0 #No single or married in marital status then its evaluating as 0
if std_deduction != 0: #checking marital_status is valid or not by checking std_deduction variable
total_income = wages-std_deduction #Toal_income variable containing wages subtracting deduction based on marital_status
#As per table condition checking income value
if total_income<=9875: # Income withing 9875 then 10% tax calculation
tax = total_income*10/100 #10% interest calculation
elif total_income>9875 and total_income<=40125: # Income withing range of 9876 and 40125 then 12% tax calculation
tax = 987.5+(total_income-9875)*12/100 # 987.5 + 12% interest calculation over 9875
elif total_income>40125 and total_income<=85525: # Income withing range of 40126 and 85525 then 12% tax calculation
tax = 4617.5+(total_income-40125)*22/100 # 4617.5 + 22% interest calculation over 40125
elif total_income>85525 and total_income<=163300:# Income withing range of 85526 and 163300 then 24% tax calculation
tax = 14605.5+(total_income-85525)*24/100 # 14605.5 + 24% interest calculation over 85525
elif total_income>163300 and total_income<=207350:# Income withing range of 163301 and 207350 then 32% tax calculation
tax = 33271.5+(total_income-163300)*32/100 # 33271.5 + 32% interest calculation over 163300
elif total_income>207350 and total_income<=518400:# Income withing range of 207351 and 518400 then 32% tax calculation
tax = 47367.5+(total_income-207350)*35/100 # 47367.5+ 35% interest calculation over 163300
elif total_income>518400: # Income over 518400 then 32% tax...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here