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

  List various bindings to determine the semantics

List the various bindings that are required to determine the semantics when the statement is executed. For each binding, indicate the binding time used for the language.

  What do you meant by abstract keyword

What does the abstract keyword do and what are generics as they relate to the built in linked list class? Why do we need them?

  Program-customer-s names phone numbers in alphabetical order

Load file into parallel arrays and display list of customers' names and phone numbers in alphabetical order.

  Using a loop to perform operations multiple times

What I need help with is to get the dice to roll 100 times instead of just one. So the read file results will show the results of 100 rolls of the dice

  Create a package called my complete system

Author a new class within your newly created package called MySystemGui. In this class, you need to extend the JFrame class and implement the appropriate listeners so that your system will work.

  Create a class diagram and define the classes

Completed class diagram should show each object's encapsulated methods, the inheritance between subject and course, and the composition of students in courses.

  Write a program that simulates the lottery

For this problem, you will simulate the lottery to put your programming knowledge for use in something practical. Write a program that simulates the lottery to help in becoming obscenely wealthy with no work whatsoever!

  What is the standard terminal symbol for a flowchart

What might be considered the seventh step of the programming process?

  Which quality control method should the manager adopt. why

Type I error probability is defined as the conditional probability of rejecting a good lot. Type II error probability is defined as the conditional probability of accepting a poor quality lot.

  Perl program that finds all the orfs in a genomic sequence

Given the genomic sequences for an organism; one of the first steps in identifying the genes is to identify the open reading frames - write a Perl program that finds all the ORFs in a genomic sequence.

  Write down a program which explores the seating patterns

write a program that explores the seating patterns related to course performance by using an array of student scores.

  Write a class that simulates managing a simple bank account

Write a class that simulates managing a simple bank account. The account is created with an initial balance. It is possible to deposit and withdraw funds, to add interest, and to find out the current balance.

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