Write a program that hints the user to input a different num

Assignment Help Computer Engineering
Reference no: EM132107936

## Programming language is python.

Write a program that hints the user to input a different number each time repetitively (both integer and float numbers are acceptable).

1. It should meet the requirements listed below:

There are three types of legitimate input for this program

numeric value---------used to calculate average

#---------------used to continue to the next input

done-------------- used to terminate the program

2. If the user input a number, add this number to all the existing numbers from user's previous input and calculate their real-time average. Display this real-time average (float number) in the next round of user input hint message in terms of "Please input a number. Current average is ..."

For instance, in the first round, I don't have any numbers from previous input. The program tells me that my currents average is 0 and asks for my input.

3.The input number should be different from any numbers previous entered. If I input a number that has already been added before, the program will not accept the number and instruct me to input a non-duplicated number in the next round. For example, if I enter 2 again, the program will tell me "No duplicate number" in the input hint message.

4.When user input "#", the program will skip to the next round of input without any changes being made. The average will remain the same.

5. When user input anything other than number, "#", and "done", the program will not accept the input. The program will tell user "Please provide meaningful input" in the input hint message in the next round. For example, if I enter "gh". The program will find out that it is not a valid input and warn me to input something meaningful instead in the next round

6. When the user input "done". The program execution stops and displays to the user the average of all the numbers previously entered by printing out "Program execution ended. The average is ...". Now I input "done," the program will stop executing and print out my final average value.

Reference no: EM132107936

Questions Cloud

Authoritarian budget processes and participatory budget : What is the difference between authoritarian budget processes and participatory budget processes?
Calculate the cost installing a fence around a rectangular : Create an application that can be used to calculate the cost installing a fence around a rectangular area.
What is the value of the stock : The risk-free rate of interest is 7 percent, the market return is 13 percent, and the stock's beta is 1. What is the value of the stock?
Prices of longer maturity bonds : Simple interest is charged on bank bills while compound interest is applied on bonds. Prices of longer maturity bonds are more sensitive to interest rate
Write a program that hints the user to input a different num : Write a program that hints the user to input a different number each time repetitively (both integer and float numbers are acceptable).
What is the present value of the offer : What is the present value of the offer if the discount rate is 10 percent?
Write a program to load the names in the combo box : Create an SQL or Access database with all your friends' information and write a program to load the names in the combo box.
Present value of the cash flows : What is the present value of the cash flows from your lottery winnings?
Test case a single line comprising the passages : IBM cognitive computing|IBM "cognitive" computing is a revolution| ibm cognitive computing|'IBM Cognitive Computing' is a revolution?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a short and efficient recursive function

Write a short and efficient recursive function int shortestPath (Node n) that returns the number of links on the shortest path from Node n to a leaf Node.

  Examine practicality of building multiple interface options

Examine the practicality of building multiple interface options for diverse populations, rather than building one (1) interface that meets the needs.

  Implement the binary tree adt using an array list

Implement the binary tree ADT using an array list. Implement the tree ADT using a linked structure.

  Develop web page that provides a list of five css resources

Develop Web page that provides a list of at least five CSS resources on the Web. For each CSS resource provide the URL, Web site name, and a brief description.

  Discuss the concept of pipeline and floating point numbers

Design a pipeline for multiplying two floating-point numbers represented in IEEE standard format. Assume that addition requires T seconds and multiplication.

  Calculate the overall overhead for this data transmission

In problem , what is the overhead of one frame in bytes? The number must be integer. Do not put anything else alter the number.

  What is purpose of random access memory in computer system

What is the purpose of random access memory in the computer system? permanently simultaneously? Which of the following hacking-related developments occurred after the year 2000?

  Write function compound interest that takes in interest rate

Write a function compound Interest that takes in an interest rate, a starting balance, and a number of years, then returns what the new balance would be.

  Creating a secure messaging app from scratch

Creating a secure messaging app from scratch using all the principles learned from the mistakes of current products by emphasizing security.

  Design a suitable interface between a computer and printer

A printer has an 8-bit parallel Centronics interface that consists of an 8-bit parallel data bus and three control lines. DSTB* is an active-low pulsed data.

  How many students took the exam

The correct answers are the first 30 characters; they are followed by an integer number that says how many students took the exam (call it N).

  Problem related to two concentric horizontal cylinders

Consider two concentric horizontal cylinders of diameters 55 cm and 65 cm, and length 125 cm. The surfaces of the inner and outer cylinders are maintained.

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