Question

Tax Calculator: Write a program that calculates Federal and CA State tax based on gross income...

Tax Calculator: Write a program that calculates Federal and CA State tax based on gross income that was input from user. The program should print the gross income, federal tax mount, state tax amount and net income (earnings after tax deduction) using python program

0 0
Add a comment Improve this question Transcribed image text
Answer #1
def main():
    salary = float(input('Enter salary: '))
    federal_tax = 0.1 * salary
    if salary > 100000:
        federal_tax = 0.15 * salary
    state_tax = 0.05 * salary
    net_salary = salary - (federal_tax + state_tax)
    print("Gross income: ${:.2f}".format(salary))
    print('Federal Tax is ${:,.2f}'.format(federal_tax))
    print('State Tax is ${:,.2f}'.format(state_tax))
    print('Net salary is ${:,.2f}'.format(net_salary))


main()
Add a comment
Know the answer?
Add Answer to:
Tax Calculator: Write a program that calculates Federal and CA State tax based on gross income...
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
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
ADVERTISEMENT