Question

In: Computer Science

Phyton Question: You have been hired to create a program that computes that Monthly Net Pay...

Phyton Question:

You have been hired to create a program that computes that Monthly Net Pay for a worker after acquiring from the user their Annual Gross Salary. The deductions that are to be considered are an Income Tax of 22.5%, a Social Security Tax of 6.2%, and a Medicare Tax of 1.45%. The program should end by displaying the Monthly Net Pay to the user.

Design the algorithm for this program using your preferred method of representation (Pseudocode OR Flowchart).

Solutions

Expert Solution

An algorithm is a step-by-step procedure that gives a solution to the problem.

The required algorithm is given below:

Step 1: Start

Step 2: Declare variables annualGrossSalary, sst, medTax, netPay, and monthlyNetPay

Step 3: Read values annualGrossSalary

Step 4: incomeTax = annualGrossSalary * 22.5 / 100

Step 5: sst = annualGrossSalary * 6.2 / 100

Step 6: medTax = annualGrossSalary * 1.45 / 100

Step 7: netPay = annualGrossSalary - incomeTax - sst - medTax

Step 8: monthlyNetPay = netPay / 12

Step 9: Display "monthlyNetPay" on the computer screen

Step 10: Stop

The python source code is given below:

#get user input
annualGrossSalary = int(input("Enter the annual gross salary: "))

#calculate the deduction
incomeTax = annualGrossSalary * 22.5 / 100
sst = annualGrossSalary * 6.2 / 100
medTax = annualGrossSalary * 1.45 / 100

netPay = annualGrossSalary - incomeTax - sst - medTax
monthlyNetPay = netPay / 12

#display the montlhy salary
print("The montlhy net payment is:",monthlyNetPay)

The screenshot of the above source code is given below:

OUTPUT:

Enter the annual gross salary: 150000
The montlhy net payment is: 8731.25


Related Solutions

In C Program #include Create a C program that calculates the gross and net pay given...
In C Program #include Create a C program that calculates the gross and net pay given a user-specified number of hours worked, at minimum wage. The program should compile without any errors or warnings (e.g., syntax errors) The program should not contain logical errors such as subtracting values when you meant to add (e.g., logical errors) The program should not crash when running (e.g., runtime errors) When you run the program, the output should look like this: Hours per Week:...
You have been hired as the Controller at Coastline, Inc. to prepare the monthly adjusting journal...
You have been hired as the Controller at Coastline, Inc. to prepare the monthly adjusting journal entries, if necessary, as part of the accounting cycle. Your junior accountant asks you to explain: Why adjusting journal entries are important / necessary in the accounting cycle process? What are the four categories of adjusting journal entries per U.S. GAAP?
You have to write a program that computes the area of a triangle. Input consists of...
You have to write a program that computes the area of a triangle. Input consists of the three points that represent the vertices of the triangle. Points are represented as Cartesian units i.e. X,Y coordinates as in (3,5). Output must be the three points, the three distances between vertices, and the area of the triangle formed by these points. The program must read the coordinates of each point, compute the distances between each pair of them and print these values....
Problem Statement You have been hired by Mike and Diane's Pizza to write a program to...
Problem Statement You have been hired by Mike and Diane's Pizza to write a program to take a customer's order. Based on the user's choices (i.e., pizza size, crust type, and toppings), a summary of the order and the total cost are displayed. Users named Mike or Diane receive a $2.00 discount. Here is an example program run (user input is in bold): -Create the Scanner object, prompt the user and get firstName. You will need to import the Scanner...
You have just been hired as a community health program planner by a local city. The...
You have just been hired as a community health program planner by a local city. The city has noticed that childhood obesity rates have been steadily increasing and would like you to develop programs to help decrease childhood obesity in the city. You notice that the city does not have physical activity programs. Which model/framework would you use to develop such a program? Explain your answer.
Need a solution for question no.2 For this activity, you have been hired as a team...
Need a solution for question no.2 For this activity, you have been hired as a team of consultants on a multi-year basis for a global washer and dryer manufacturer. They currently offer two core washer and dryer sets: a high-end model and an economic model. You are tasked to complete several calculations and present your findings to the company stakeholders. You may use any presentation software (Google Slides, Prezi, PowerPoint, etc.) and your completed presentation should consist of 8 –...
Need a solution for question no.1 For this activity, you have been hired as a team...
Need a solution for question no.1 For this activity, you have been hired as a team of consultants on a multi-year basis for a global washer and dryer manufacturer. They currently offer two core washer and dryer sets: a high-end model and an economic model. You are tasked to complete several calculations and present your findings to the company stakeholders. You may use any presentation software (Google Slides, Prezi, PowerPoint, etc.) and your completed presentation should consist of 8 –...
The following is an Excel question: You have been hired by Club 2010 to design and...
The following is an Excel question: You have been hired by Club 2010 to design and implement a worksheet for the "greeter" at the door to use to determine whether people are old enough to enter. Create a model that allows the user to enter his/her birth date. The model should compute the user’s age and in another cell, it should appear either "Welcome" if the person is at least 21 years old as of today, or "Sorry, you are...
You have been asked to create a program that builds a tower base on the number...
You have been asked to create a program that builds a tower base on the number of items given as input. When the only 1 item is given you create no tower you just place the item on top of the stand. When 2 items are given you build the base of the tower with one foot to the right and one foot to the left. The feet will be in the ground and support the tower. For every additional...
You have been hired as a consultant for technology company. Create a study which would look...
You have been hired as a consultant for technology company. Create a study which would look into ways that would increase productivity for this company using a one-way ANOVA. What is your IV? What is your DV? How many levels of your IV are there and what are they?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT