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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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