Question: Note: we are not concerned with rounding at the calculation level, however, please take note of the decimal precision represented in the output below Output






Note: we are not concerned with rounding at the calculation level, however, please take note of the decimal precision represented in the output below Output Once you have calculated the necessary information, you should generate a pay summary for the employee. Given the following input: PCR9906601022021 13.3#09112232020 you should generate an output looking like the following One-oh-2 Company Date: 01/02/2021 99066 / McGee, Fibber 79 Wistful Vista Des Moines, IA 50310-5565 PAY CALCULATION Workdate 12/23/2020 Netpay Hours 13.30 Premium 00 Rate 71.45 Deductions Gross Pay 950.29 DEDUCTIONS Federal 89.20 Healthcare 15.38 401K 199.56 NET PAY $ 950.29 $ 304.15 $ 646.14 Print the entire employee_address line 2 list (just print the entire list in both cases - no special formatting required) Payroll calculation request . Additional input If the first line of data you read is a payroll calculation request, you will have to take in another row of data Pay Calculation For the additional row of input, you need to calculate the pay associated with the time card. Gross pay is a combination of regular pay and premium pay which is given for performing hazardous work. Gross pay should be calculated with the following considerations: Time card pay is regular pay + premium pay (if applicable) Regular pay is employee standard pay rate x hours worked on the time card Premium pay is regular pay x premium % from the time card Deductions Calculation . After computing the gross pay, you need to calculate the following deductions: Federal Tax Health Insurance Deduction, and 401(k) Deduction The Federal Tax Deduction will be essentially the same calculations you performed in project 1. However, we have created a function called federal_tax to perform this function for you. This function is included in the starting code for the project. To use this function, you must pass the annual income and the marital status as arguments; as a result, the function will return the an unrounded annual tax amount.Do not change any of the code in this function. Recall that in project 1 we used an annual income to compute federal tax. In this project, we are calculating a weekly pay - you will need to take this into account when calling the federal tax function and when using the result from the function. The Health Insurance deduction will also be essentially the same as project 1. You may write a function to compute the Health Insurance deduction if you wish, but it is not required. As a reminder, the annual health insurance deduction for single employees is $800, while the deduction for married employees is $1000 o Finally, the 401(k) deduction will be calculated by finding the employee's 401(k) deduction percentage in the employee tables, then multiplying the deduction percentage times the gross pay for the employee. This should represent a weekly deduction Notewe are not concerned with rounding at the calculation level, however, please take note of the decimal precision represented in the output below Output After getting the first line of data for a request your program should perform general error checking. Required validation and associated error messages include Check first to see if the request type is valid. (Is it ACR or PCRP). If it is neither of these types, then you should display the following error and perform no further processing Invalid request type (XXX) where XXX was the request type that was input. . Checking for a valid employee number (does the employee number exist in the employee list data?). If it does not exist, you should display the following error and perform no further processing: Invalid employee number (#++++) where ##### is what was in the employee number position If no error conditions exist at this point, you should proceed with the appropriate processing of the request you have read in Specific Processing Employee Address Change If the request is an employee address change, you will need to perform the following processing 1. Error checking Check to see if the new address contains a valid zipcode according to the following rules . 10 characters in length 5 numeric digits, followed by a hyphen (dash), followed by 4 numeric characters If the zipcode does not meet this validity check, display the following message and perform no further processing Invalid zipcode, request denied 2. Volid data process employee address change Update the employee address line 1 with the new street address in the employee data, Update the employee address line 2 with the new city, state, and zip in the employee data, and Print the entire emplovee address line 1 list make better use of your time and understanding of your program, instead of employing a random guess and submit strategy which does not help you Remember, you can submit as many times as you want in develop mode with no restrictions. Processing - Details Address Change Request Format An Address Change Request will be provided as a single input line to your program, The Address Change Request will consist of Athree-character request type (ACR). A five-digit employee number, A 30-character address representing the employee's new street address, and . A 30-character address representing the employee's new city/state/zip. Example Address Change Request ACRS0991322 Maple Street Dewitt, MI 48820-9876 Data in an address change request is in fixed with format. Different data elements will always fall in the same location in the data line. In other words, it is guaranteed that the first 3 characters are the request type (ACR), the next 5 characters are the employee number the next 30 are the street address, and the next 30 are the city, state, and zip. Note that while the address fields in the input line are 30 characters each to allow for potentially long addresses, the addresses in the Employee lists are variable length and do not have the trailing spaces, Payroll Calculate Request Format A Payroll Calculation Request as input will start with the characters PCR, and it means that you will have to read one additional input line to complete the request Each Payroll Calculation Request will always consist of two lines The format of the first line of a Payroll Calculation Request is in fixed width format and will consist of: Athree-character request type (PCR) A five-digit employee number An eight-digit payroll date (MMDDYYYY) make better use of your time and understanding of your program, instead of employing a random guess and submit strategy which does not help you Remember, you can submit as many times as you want in develop mode with no restrictions. Processing - Details Address Change Request Format An Address Change Request will be provided as a single input line to your program, The Address Change Request will consist of Athree-character request type (ACR). A five-digit employee number, A 30-character address representing the employee's new street address, and . A 30-character address representing the employee's new city/state/zip. Example Address Change Request ACRS0991322 Maple Street Dewitt, MI 48820-9876 Data in an address change request is in fixed with format. Different data elements will always fall in the same location in the data line. In other words, it is guaranteed that the first 3 characters are the request type (ACR), the next 5 characters are the employee number the next 30 are the street address, and the next 30 are the city, state, and zip. Note that while the address fields in the input line are 30 characters each to allow for potentially long addresses, the addresses in the Employee lists are variable length and do not have the trailing spaces, Payroll Calculate Request Format A Payroll Calculation Request as input will start with the characters PCR, and it means that you will have to read one additional input line to complete the request Each Payroll Calculation Request will always consist of two lines The format of the first line of a Payroll Calculation Request is in fixed width format and will consist of: Athree-character request type (PCR) A five-digit employee number An eight-digit payroll date (MMDDYYYY) code for the project The employee information is provided in the following synchronized lists: Employee Number Employee Name Employee Address 1 (street address) . Employee Address 2 (city, state zipcode) Employee Marital Status . Employee Hourly Pay Rate Employee 401(k) deduction percentage Clarification when we refer to synchronized lists, we mean that each list is aligned with its corresponding information. This means for example, that the fifth item in each of the employee lists pertain to the same employee Processing - Overview Your program will need to be able to process two different types of payroll processing requests 1. Address change request Check to see if new address in input contains a valid zipcode. Display error message for invalid data, or update the employee address. 2. Payroll calculation request Calculate pay from time card(s) Calculate deductions Generate formatted paycheck report These requests will be provided through user input instructions that you will have to specify in your program. More details on each request is provided below. Because we have not covered iteration yet, your program will process only one request at a time. Your program must be able to process either of the request types based on the data that is provided as input. For each run of the program, you will prompt the user for input and they will enter information for one of the above payroll processing requests. When you run the program in submit mode, zyBooks will simulate running the program multiple times providing a single processing request to your program to process for each "run". IMPORTANT NOTE! While you will still be allowed unlimited attempts and runs in Develop mode, your number of submissions in Submit Mode will be restricted to 50, and there is a waiting time of 5 minutes between Submit Mode submissions. This is intended to help you 15.2 SS 21 Project 2 - Compute a Paycheck V2 IMPORTANT NOTE: This problem description is lengthy. Unfortunately, to properly describe the problem, it requires a fair amount of detail It also requires a fair amount of attention to detail as you are working on the project. However, the length of this document is not the same as complexity of the problem you are being asked to solve. Therefore, do not immediately assume by the length of project description that you'll never solve it Additionally, if your approach to solving the course problems is to immediately jump in and start coding, be advised that you will more than likely spend a lot more time working on the project that way than if you had invested more time up front reading and understanding the requirements, mapping out your solution (pseudocode), and THEN moving into implementing the Python code. Additionally, this is an excellent example of a program that can be developed in phases -- you can get different pieces of the program working one at a time before moving on to the next phase Project Description Objectives In this program you will once again be developing a solution to solve a described problem. Many of the skills you called upon to finish previous work will be needed in addition to new skills such as: string manipulation list structures and related commands string formatting string methods Project Overview In this project, we are again doing payroll processing. You will see some similarities to project 1; however, you will be coding a solution that is more comprehensive in nature, including being able to process two different types of input Information to be provided Typically data is maintained in stored data files. However, because we have not yet covered processing of input from files in Python, we will instead be providing some of the information needed for this project via predefined lists. These lists are provided as part of the starting Note: we are not concerned with rounding at the calculation level, however, please take note of the decimal precision represented in the output below Output Once you have calculated the necessary information, you should generate a pay summary for the employee. Given the following input: PCR9906601022021 13.3#09112232020 you should generate an output looking like the following One-oh-2 Company Date: 01/02/2021 99066 / McGee, Fibber 79 Wistful Vista Des Moines, IA 50310-5565 PAY CALCULATION Workdate 12/23/2020 Netpay Hours 13.30 Premium 00 Rate 71.45 Deductions Gross Pay 950.29 DEDUCTIONS Federal 89.20 Healthcare 15.38 401K 199.56 NET PAY $ 950.29 $ 304.15 $ 646.14 Print the entire employee_address line 2 list (just print the entire list in both cases - no special formatting required) Payroll calculation request . Additional input If the first line of data you read is a payroll calculation request, you will have to take in another row of data Pay Calculation For the additional row of input, you need to calculate the pay associated with the time card. Gross pay is a combination of regular pay and premium pay which is given for performing hazardous work. Gross pay should be calculated with the following considerations: Time card pay is regular pay + premium pay (if applicable) Regular pay is employee standard pay rate x hours worked on the time card Premium pay is regular pay x premium % from the time card Deductions Calculation . After computing the gross pay, you need to calculate the following deductions: Federal Tax Health Insurance Deduction, and 401(k) Deduction The Federal Tax Deduction will be essentially the same calculations you performed in project 1. However, we have created a function called federal_tax to perform this function for you. This function is included in the starting code for the project. To use this function, you must pass the annual income and the marital status as arguments; as a result, the function will return the an unrounded annual tax amount.Do not change any of the code in this function. Recall that in project 1 we used an annual income to compute federal tax. In this project, we are calculating a weekly pay - you will need to take this into account when calling the federal tax function and when using the result from the function. The Health Insurance deduction will also be essentially the same as project 1. You may write a function to compute the Health Insurance deduction if you wish, but it is not required. As a reminder, the annual health insurance deduction for single employees is $800, while the deduction for married employees is $1000 o Finally, the 401(k) deduction will be calculated by finding the employee's 401(k) deduction percentage in the employee tables, then multiplying the deduction percentage times the gross pay for the employee. This should represent a weekly deduction Notewe are not concerned with rounding at the calculation level, however, please take note of the decimal precision represented in the output below Output After getting the first line of data for a request your program should perform general error checking. Required validation and associated error messages include Check first to see if the request type is valid. (Is it ACR or PCRP). If it is neither of these types, then you should display the following error and perform no further processing Invalid request type (XXX) where XXX was the request type that was input. . Checking for a valid employee number (does the employee number exist in the employee list data?). If it does not exist, you should display the following error and perform no further processing: Invalid employee number (#++++) where ##### is what was in the employee number position If no error conditions exist at this point, you should proceed with the appropriate processing of the request you have read in Specific Processing Employee Address Change If the request is an employee address change, you will need to perform the following processing 1. Error checking Check to see if the new address contains a valid zipcode according to the following rules . 10 characters in length 5 numeric digits, followed by a hyphen (dash), followed by 4 numeric characters If the zipcode does not meet this validity check, display the following message and perform no further processing Invalid zipcode, request denied 2. Volid data process employee address change Update the employee address line 1 with the new street address in the employee data, Update the employee address line 2 with the new city, state, and zip in the employee data, and Print the entire emplovee address line 1 list make better use of your time and understanding of your program, instead of employing a random guess and submit strategy which does not help you Remember, you can submit as many times as you want in develop mode with no restrictions. Processing - Details Address Change Request Format An Address Change Request will be provided as a single input line to your program, The Address Change Request will consist of Athree-character request type (ACR). A five-digit employee number, A 30-character address representing the employee's new street address, and . A 30-character address representing the employee's new city/state/zip. Example Address Change Request ACRS0991322 Maple Street Dewitt, MI 48820-9876 Data in an address change request is in fixed with format. Different data elements will always fall in the same location in the data line. In other words, it is guaranteed that the first 3 characters are the request type (ACR), the next 5 characters are the employee number the next 30 are the street address, and the next 30 are the city, state, and zip. Note that while the address fields in the input line are 30 characters each to allow for potentially long addresses, the addresses in the Employee lists are variable length and do not have the trailing spaces, Payroll Calculate Request Format A Payroll Calculation Request as input will start with the characters PCR, and it means that you will have to read one additional input line to complete the request Each Payroll Calculation Request will always consist of two lines The format of the first line of a Payroll Calculation Request is in fixed width format and will consist of: Athree-character request type (PCR) A five-digit employee number An eight-digit payroll date (MMDDYYYY) make better use of your time and understanding of your program, instead of employing a random guess and submit strategy which does not help you Remember, you can submit as many times as you want in develop mode with no restrictions. Processing - Details Address Change Request Format An Address Change Request will be provided as a single input line to your program, The Address Change Request will consist of Athree-character request type (ACR). A five-digit employee number, A 30-character address representing the employee's new street address, and . A 30-character address representing the employee's new city/state/zip. Example Address Change Request ACRS0991322 Maple Street Dewitt, MI 48820-9876 Data in an address change request is in fixed with format. Different data elements will always fall in the same location in the data line. In other words, it is guaranteed that the first 3 characters are the request type (ACR), the next 5 characters are the employee number the next 30 are the street address, and the next 30 are the city, state, and zip. Note that while the address fields in the input line are 30 characters each to allow for potentially long addresses, the addresses in the Employee lists are variable length and do not have the trailing spaces, Payroll Calculate Request Format A Payroll Calculation Request as input will start with the characters PCR, and it means that you will have to read one additional input line to complete the request Each Payroll Calculation Request will always consist of two lines The format of the first line of a Payroll Calculation Request is in fixed width format and will consist of: Athree-character request type (PCR) A five-digit employee number An eight-digit payroll date (MMDDYYYY) code for the project The employee information is provided in the following synchronized lists: Employee Number Employee Name Employee Address 1 (street address) . Employee Address 2 (city, state zipcode) Employee Marital Status . Employee Hourly Pay Rate Employee 401(k) deduction percentage Clarification when we refer to synchronized lists, we mean that each list is aligned with its corresponding information. This means for example, that the fifth item in each of the employee lists pertain to the same employee Processing - Overview Your program will need to be able to process two different types of payroll processing requests 1. Address change request Check to see if new address in input contains a valid zipcode. Display error message for invalid data, or update the employee address. 2. Payroll calculation request Calculate pay from time card(s) Calculate deductions Generate formatted paycheck report These requests will be provided through user input instructions that you will have to specify in your program. More details on each request is provided below. Because we have not covered iteration yet, your program will process only one request at a time. Your program must be able to process either of the request types based on the data that is provided as input. For each run of the program, you will prompt the user for input and they will enter information for one of the above payroll processing requests. When you run the program in submit mode, zyBooks will simulate running the program multiple times providing a single processing request to your program to process for each "run". IMPORTANT NOTE! While you will still be allowed unlimited attempts and runs in Develop mode, your number of submissions in Submit Mode will be restricted to 50, and there is a waiting time of 5 minutes between Submit Mode submissions. This is intended to help you 15.2 SS 21 Project 2 - Compute a Paycheck V2 IMPORTANT NOTE: This problem description is lengthy. Unfortunately, to properly describe the problem, it requires a fair amount of detail It also requires a fair amount of attention to detail as you are working on the project. However, the length of this document is not the same as complexity of the problem you are being asked to solve. Therefore, do not immediately assume by the length of project description that you'll never solve it Additionally, if your approach to solving the course problems is to immediately jump in and start coding, be advised that you will more than likely spend a lot more time working on the project that way than if you had invested more time up front reading and understanding the requirements, mapping out your solution (pseudocode), and THEN moving into implementing the Python code. Additionally, this is an excellent example of a program that can be developed in phases -- you can get different pieces of the program working one at a time before moving on to the next phase Project Description Objectives In this program you will once again be developing a solution to solve a described problem. Many of the skills you called upon to finish previous work will be needed in addition to new skills such as: string manipulation list structures and related commands string formatting string methods Project Overview In this project, we are again doing payroll processing. You will see some similarities to project 1; however, you will be coding a solution that is more comprehensive in nature, including being able to process two different types of input Information to be provided Typically data is maintained in stored data files. However, because we have not yet covered processing of input from files in Python, we will instead be providing some of the information needed for this project via predefined lists. These lists are provided as part of the starting
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
