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

Assignment Help Programming Languages
Reference no: EM131327340

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.

Reference no: EM131327340

Questions Cloud

What must the loan balance be if it is repaid after year 4 : What must the loan balance be if it is repaid after year 4? What will be the yield to the lender if the loan is repaid at the end of year 4?
With all of the investment to be made at the outset : A Japanese electronics manufacturer is contemplating investing $1 billion (with all of the investment to be made at the outset) in a 10-year investment project in the U.S. The Japanese company is well known in world capital markets and is universally..
What will be yield to lender if it is repaid after 8 years : How much will be due at the end of 10 years?- What will be the yield to the lender if it is repaid after 8 years?- If 1 point is charged in (b) what will be the yield to the lender?
What is the effective interest rate for the borrower : How much will the lender actually disburse?- What is the effective interest rate for the borrower, assuming that the mortgage is paid off after 30 years (full term)?
Write a program that prompts the user for a list of numbers : 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.
Understanding of the foundation of the ccss for math : Part One: First, in one paragraph, summarize your understanding of the foundation of the CCSS for Math and English Arts. Next, adopting the perspective of a teacher leader, in at least two paragraphs, evaluate how CCSS (Math and English Language Arts..
What origination fee should the lender charge : What origination fee should the lender charge? What fee should be charged if it is expected that the loan will be repaid after 10 years?
If the loan is repaid after five years : If the loan is repaid after 20 years, which loan would be the better choice?- If the loan is repaid after five years, which loan is the better choice?

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd