Write a program that prompts the user for a list of numbers


1.) take into account the number of hours worked. If the hours is greater than 40, then calculate 1.5 times the rate times the hours over 40. Add the overtime pay to the regular pay, calculated by multiplying rate times hours worked (less than or equal to 40).

hours:45

rate:10

pay:475.0

2.) use a try: and except: block to prevent the program from abnormally terminating if the user doesn't enter valid numbers for the hours and the rate.

Hours: 20

Rate: 9

Error Please enter numeric input

Hours: 40

error, please enter numeric input

2.0

Rewrite your pay computation with time-and-a-half for overtime and create a function called computepay which takes two parameters ( hours and rate).

hours: 45

rate: 10

pay:475.0

3.0

Write a program which reads a list of numbers until "done" is entered. Once done is entered, print out the total, the count of numbers, and the average of the numbers.

(Loop with user input of numbers, producing an average and a count of all the numbers.)

If the user enters anything other than a number, print an error message and skip to the next number.

4.0

Write a program that prompts the user for a list of numbers that represent numeric grades. As each grade is input, compare it against 2 variables, highest and lowest. Save the value of the highest grade in highest, and the lowest grade in lowest. Add up all the numbers entered, but subtract the highest and the lowest numbers at the end. Then, average all the numbers entered (without the highest and the lowest). Display the average, the highest grade and the lowest grade. The message should state that the average was computed by dropping the highest and the lowest grades.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write a program that prompts the user for a list of numbers
Reference No:- TGS01729984

Expected delivery within 24 Hours