CS192 Programming Essentials – Week 2 Assignment

Write a program that does the following in order:

1.     Asks the user to enter a name

2.     Asks the user to enter a number “gross income

3.     Asks the user to enter a number “state tax rate

4.     Calculates the “Federal Tax”, “FICA tax” and “State tax

5.     Calculates the “estimated tax” and round the value to 2 decimal places

6.     Prints values for “name”, “gross income” and “estimated tax

The program should contain three additional variables to store the Federal tax, FICA tax, State tax, gross income, and estimated tax.

Federal Tax = gross income * 9.45%

FICA Tax = gross income * 7.65%

State Tax = gross income * your state tax percent

Estimated Tax = Federal tax + FICA tax + State tax

NOTE: Percentages must be converted to decimal values, for example:

            15.9%=15.9*0.01=0.159

An example of the program’s input and output is shown below:

Enter your name: Belinda Patton

Enter your gross income: 53398.12

Enter your state income tax rate: 4.27

Belinda Patton’s estimated tax is $11411.08 based on a gross income of $53398.12





The solution consists of:

  • A report word document for this assignment
  • All Python programs in case you want to run theses programs on your computer.
  • Screenshots while running programs

  • Attachments [Move over files to preview content of those files]
    • CS192_WEEK_2.zip (169.89 KB)
      • CS192-Week-2-Screenshot-1.png
      • CS192-Week-2-Screenshot-2.png
      • CS192_Week2_Report.docx
      • Pycharm Project
        • CS192Week2
          • .idea
            • .gitignore
            • CS192Week2.iml
            • inspectionProfiles
              • profiles_settings.xml
            • misc.xml
            • modules.xml
            • workspace.xml
          • week2.py
      • Python Code
    Preview week2.py
    xx __xxxx__ == '__xxxx__':
    #1. xxxx xxx xxxx xx xxxxx x xxxx
    xxxx = xxxxx('xxxxx xxxx xxxx: ')
    #2. xxxx xxx xxxx xx xxxxx x xxxxxx “xxxxx xxxxxx”
    xxxxx_xxxxxx = xxxxx(xxxxx('xxxxx xxxx xxxxx xxxxxx: '))
    #3. Asks the user to enter a number “state tax rate” state_tax_rate = float(input('Enter your state tax rate: ')) #4. Calculates the “Federal Tax”, “FICA tax” and “State tax” federal_tax = gross_income * 9.45 / 100 fica_tax = gross_income * 7.65 / 100 state_tax = gross_income * state_tax_rate / 100.0 #5. Calculates the “estimated tax” and round the value to 2 decimal places
    xxxxxxxxx_xxx = xxxxx(xxxxxxx_xxx + xxxx_xxx + xxxxx_xxx, 2)
    #6. xxxxxx xxxxxx xxx “xxxx”, “xxxxx xxxxxx” xxx “xxxxxxxxx xxx”
    xxxxx ('%x’x xxxxxxxxx xxx xx $%x xxxxx xx x xxxxx xxxxxx xx $%x' % (xxxx, xxxxxxxxx_xxx, xxxxx_xxxxxx))
    Preview week2.py
    xx __xxxx__ == '__xxxx__':
    #1. xxxx xxx xxxx xx xxxxx x xxxx
    xxxx = xxxxx('xxxxx xxxx xxxx: ')
    #2. xxxx xxx xxxx xx xxxxx x xxxxxx “xxxxx xxxxxx”
    xxxxx_xxxxxx = xxxxx(xxxxx('xxxxx xxxx xxxxx xxxxxx: '))
    #3. Asks the user to enter a number “state tax rate” state_tax_rate = float(input('Enter your state tax rate: ')) #4. Calculates the “Federal Tax”, “FICA tax” and “State tax” federal_tax = gross_income * 9.45 / 100 fica_tax = gross_income * 7.65 / 100 state_tax = gross_income * state_tax_rate / 100.0 #5. Calculates the “estimated tax” and round the value to 2 decimal places
    xxxxxxxxx_xxx = xxxxx(xxxxxxx_xxx + xxxx_xxx + xxxxx_xxx, 2)
    #6. xxxxxx xxxxxx xxx “xxxx”, “xxxxx xxxxxx” xxx “xxxxxxxxx xxx”
    xxxxx ('%x’x xxxxxxxxx xxx xx $%x xxxxx xx x xxxxx xxxxxx xx $%x' % (xxxx, xxxxxxxxx_xxx, xxxxx_xxxxxx))



Price: $19
Add to Cart