Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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