subject

Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Pay should be the normal rate for hours up to 40 and time-and-a-half for the hourly rate for all hours worked above 40 hours.

Put the logic to do the computation of pay in a function called computepay() and use the
function to do the computation. The function should return a value. Use 45 hours and a rate of 10.50 per hour to test the program (the pay should be 498.75).

You should use input to read a string and float to convert the string to a number. Do not worry about error checking the user input unless you want to - you can assume the user types numbers properly. Do not name your variable sum or use the sum() function.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:00
Which action describes an aspect of technological design?
Answers: 1
question
Computers and Technology, 22.06.2019 09:30
My mom and i are moving and we don’t have wifi for the next week, i want to know if using a using a hotspot with unlimited data is better than using regular wifi. i’m considering cost, speed, and data sacrifices.
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
Match the items with their respective descriptions.
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Which of the following includes the three primary network access technologies? dsl, cable modem, broadband lan, wan, man voip, uc, iptv tcp/ip, ftp, dhcp
Answers: 2
You know the right answer?
Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Pa...
Questions
question
Mathematics, 24.09.2019 19:30
question
Mathematics, 24.09.2019 19:30
question
Geography, 24.09.2019 19:30
Questions on the website: 13722360