Question: Write a program to calculate the amount of an employee s paycheck Prompt the user for the hourly rate ( a floating point number )
Write a program to calculate the amount of an employees paycheck
Prompt the user for the hourly rate a floating point number and if the employee is hourly or salaried hH or sS
Salaried employees always paid for hours
Hourly employees need additional pieces of information: number of hours worked a floatingpoint number and if it was a holiday yY or nN
Holiday hours are paid at double the hourly rate
When it is not a holiday, hourly employees are paid their normal hourly rate for the first hours and for any hours over
Output the pay rounded to decimal places
Test # checks all output
Mini Test # output includes Your weekly pay $
Test # checks all output
Mini Test # output includes Your weekly pay $
Test # checks all output
Mini Test # output includes Your weekly pay $
Test # checks all output
Mini Test # output includes Your weekly pay $
Test # checks all output
Mini Test # output includes Your weekly pay $
Source Test # pay.py includes else: to demonstrate use of at least one ifelse statement
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
