Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For each of the following programs, start your code with three comment lines explaining what your program does, your name as the author, and the

image text in transcribed
image text in transcribed
For each of the following programs, start your code with three comment lines explaining what your program does, your name as the author, and the date you finished the program. You must submit your own work and only use concepts being taught in class. 1. Payroll Calculation Write a program (Payroll.py) that calculates the gross pay of an employee per day. The program prompts the user to enter the number of hours worked and the hourly pay rate. An employee who works less than or equal to 8 hours gets paid at the regular hourly pay rate. An employee who works overtime (i.e. more than 8 hours in a day) gets paid the regular pay hourly rate for 8 hours and 1.5 times the regular hourly pay rate for all hours over 8 hours. Here is the pseudo code for your program. Get the number of hours worked. Get the hourly pay rate. If the employee worked less than or equal to 8 hours: Calculate the gross pay without overtime Else: Calculate the gross pay with overtime (8"pay rate)+(hours worked-8)* pay rate*1.5 Display the gross pay. Here are two examples of the program running: Enter hours worked today: 7.5 Enter hourly pay rate: 10 ONI Enter Hourry pay rater TV Today you earned $75.0 >>> Enter hours worked today: 10 Enter hourly pay rate: 10 Today you earned $110.0 Test your program as shown above. Save the Shell window as Test1.txt. Submit Payroll.py and Test1.txt 2. Day of the Week (use a chained if statement) Write a program (WeekDay.py) that prompts the user to enter a number in the range of 1 through 7. The program will then display the corresponding day of the week, where 1 = Sunday, 2 = Monday, 3 = Tuesday, 4 = Wednesday, 5 = Thursday, 6 = Friday, and 7 = Saturday. The program should display an error message if the user enters a number that is outside the range of 1 through 7. Here are two examples of the program running: Enter the number of the day: 4 Wednesday >>> Enter the number of the day: 9 Invalid number entered Test your program as shown above. Save the Shell window as Test2.txt. Submit WeekDay.py and Test2.txt

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions

Question

8. Design office space to facilitate interaction between employees.

Answered: 1 week ago