Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Project Objectives Decision - making with if , if - else, if - elif - . . Data validation ( and correction and use of
Project Objectives
Decisionmaking with if ifelse, ifelif
Data validation and correction and use of default for user input using a while loop.
Nicely formatted numbers using format function.
Multiple input data sets ie for multiple employees
Insideout incremental development of the program.
Use PyCharm IDE rather than IDLE.
Python Language Elements:
Follow python naming conventions for variables and constants.
Use good descriptive naming for variablesconstants
Top comment must include your name, project number, lab section, and brief project description.
Project Overview
The Drive Web company consists of three divisions denoted A B and C Within each division are two subdivisions denoted by and Finally, each subdivision has three pay scales denoted by a b and c Note the use of upper and lowercase letters
You are to write a program that will ask the user to input the first and last names of an employee, and then request the employment designation which is a threecharacter string with the first character one of A B and C; the second character is one of and ; and the third character is one of a b c The user is to input these characters one at a time. Finally, the program should ask the user to enter the number of hours the employee worked during the week.
After obtaining the information above, the program should compute and report the information entered plus the total pay for the week for the employee. valid input should be checked during entry.
The total pay is the number of hours times the pay rate determined by scale up to hours, and after it is time and a half. The per hour pay rates are as follows:
Division A
SubdivisionScale a b c
Division B
SubdivisionScale a b c
Division C
SubdivisionScale a b c
Stages of the Program
program gathers input data for ONE employee without validating it calculates the total pay and print itsee below for exact format
AFTER STAGE WORKS CORRECTLY add data validation see rules below for the input gathering.
AFTER STAGE WORKS CORRECTLY add looping so that the program can handle as many employees as the user provides. After handling one employee, the program asks whether the user wants to enter data for another employee then proceeds accordinglySTAGE VERSION OF THE PROGRAM IS THE ONE THAT YOU SHOULD SUBMIT TO GET THE FULL POINTS
Input for employee
Use input function with appropriate prompts to get the following information from the user: employee first name, employee last name, numbers of hours per week, employee classification: division, subdivision, and scale.
Variable Naming
Use appropriate variable names, following the Python Naming Conventions.
Input Validation added in stage
Employees division and subdivision values can ONLY be one of: A B C or a b c
o Before checking for validity, do things to help the user by fixing certain things:
o Grab just the th char they entered in case they type in Low char inputstr
o Capitalize that first char in case they entered a capchar charupper
o If its invalid, keep asking the user for a valid divisionsubdivision letter until they enter something correct.
o Each of the divisionsubdivision values will have its own validation loop.
Number of hours must be a positive number integer thats
o If its invalid, keep asking the user for a valid number of hours until they enter something correct.
Input Multiple Employees added in stage
After printing the report for one employee, ask the user if they wish to enter another employee YES or NO
o If they say YES or Yes or yes or YEs or yeS or or Y or y then go around the big loop again.
Use the String methods to grab just the st char and capitalize it to reduce the number of cases that need to be checked to just Yso thatd include yup, yea, yo yellow,
o Any other response like NonoNnnopenawwhateverwho caresredgreen will be assumed to be a NO
Program Control Structures
Use ifelse, ifelif to determine the total pay each employee entered by the user
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started