Question

PYTHON Methods void read_data() Description: It handles the reading from the input and the storage of...

PYTHON

Methods

void read_data()

Description: It handles the reading from the input and the storage of the above class properties

void write_data()

Description: It handles the writing to the output of the final tax return result

float adjusted_gross_income(float income)

Description: It returns the adjusted gross income

Logic: Adjusted gross income is what remains in the income after subtracting the social security and medicare taxes. Social security rate is 12.4%. Medicare is 2.9% but it only applies to the first $100K of the income. Both social security and medicare taxes are split equally between employer and employee.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Consider the following python code:

def read_data(): #Function for reading the data.
return float(input("Enter income "))
  

def write_data(gross_income): #Function for writing the data as output.
print(gross_income)

def adjusted_gross_income(income): #Function for calculating the gross income.
medicare_tax = 0
social_security_tax = (12.4/100) * income #calculating security tax.
if income > 100:
medicare_tax = (2.9/100) * income #calculating medicare tax.
gross_income = income - (social_security_tax + medicare_tax) #calculating gross income.
return gross_income


write_data(adjusted_gross_income(read_data())) #Function calling.

Add a comment
Know the answer?
Add Answer to:
PYTHON Methods void read_data() Description: It handles the reading from the input and the storage of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Tony and Jeannie Nelson are married and file a joint return. They have four children whose...

    Tony and Jeannie Nelson are married and file a joint return. They have four children whose ages are: 12,15,19 & 23. The three youngest live at home with their parents and qualify as their dependents. The oldest Roger got married on 5/5 2019 and lives with his wife, Jane. The 19-year old Tabitha is studying Fine Arts at Savannah College of Art & Design. During the summer she helps her mother put together the art exhibits. They provide you with...

  • Gleim 6 Deductions from AGI [1] Which one of the following expenses does not qualify as...

    Gleim 6 Deductions from AGI [1] Which one of the following expenses does not qualify as a deductible medical expense? A. Cost of long-term care for a developmentally disabled person in a relative’s home. B. Special school for a deaf child to learn lip reading. C. Cost of elevator installed for individual who had heart bypass surgery (in excess of increase in value of individual’s home). D. Cost and care of guide dogs used by a blind person in his...

  • This year Evan graduated from college and took a job as a deliveryman in the city....

    This year Evan graduated from college and took a job as a deliveryman in the city. Evan was paid a salary of $68,500 and he received $700 in hourly pay for part-time work over the weekends. Evan summarized his expenses below: Cost of moving his possessions to the city (125 miles away) Interest paid on accumulated student loans Cost of purchasing a delivery uniform Contribution to State University deliveryman program $1,200 2,840 1,440 1,320 Calculate Evan's AGI and taxable income...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT