Question

In Python 3, Write a program that reads a set of floating-point values. Ask the user...

In Python 3, Write a program that reads a set of floating-point values. Ask the user to enter the values, then print: The number of values entered. The smallest of the values The largest of the values. The average of the values. The range, that is the difference between the smallest and largest values. If no values were entered, the program should display “No values were entered” The program execution should look like (note: the bold values are sample user inputs): This program allows you to enter as many numbers as you want and then displays the number of numbers that you entered, the smallest value, the largest value, the average, and the range. Enter a number (0 to quit): 0 No values were entered. Please run the program again.

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
In Python 3, Write a program that reads a set of floating-point values. Ask the user...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In C++ 2. Write a program that allows the user to enter a series of positive...

    In C++ 2. Write a program that allows the user to enter a series of positive numbers between 1 and 100 and displays the smallest and largest of the numbers entered. The program should not store the numbers that were entered, only keep track of the smallest and largest ones. The program should continue accepting numbers until the value 0 is entered and then display the results. If a number out of range is entered, tell the user it is...

  • In Python 3 - Write a program that reads a sequence of integer inputs from the...

    In Python 3 - Write a program that reads a sequence of integer inputs from the user. When the user is finished entering the integers, they will enter a 'q'. There is no need to check if the entry is a valid integer. All integers in the test data (input) will be between -255 and 255. The program should then print: The smallest and largest of the inputs. The number of even and odd inputs (0 should be considered even)...

  • In this exercise, write a complete Java program that reads integer numbers from the user until...

    In this exercise, write a complete Java program that reads integer numbers from the user until a negative value is entered. It should then output the average of the numbers, not including the negative number. If no non-negative values are entered, the program should issue an error message. You are required to use a do-while loop to solve this problem. Solutions that do not use a do-while loop will be given a zero. Make sure to add appropriate comments to...

  • Write a PYTHON program that reads a file (prompt user for the input file name) containing...

    Write a PYTHON program that reads a file (prompt user for the input file name) containing two columns of floating-point numbers (Use split). Print the average of each column. Use the following data forthe input file: 1   0.5 2   0.5 3   0.5 4   0.5 The output should be:    The averages are 2.50 and 0.5. a)   Your code with comments b)   A screenshot of the execution Version 3.7.2

  • Write a program that receives a series of numbers from the user and allows the user...

    Write a program that receives a series of numbers from the user and allows the user to press the enter key to indicate that he or she is finished providing inputs. After the user presses the enter key, the program should print the sum of the numbers and their average.   >>> totalSum =0 >>> count=0 >>> while True:    number=input("Enter a number or press enter to quit:")    if number =="":        break    totalSum += float(number)    count+=1...

  • c++ no pointers just follow instructions Write a program (array.cpp) that read positive floating point numbers...

    c++ no pointers just follow instructions Write a program (array.cpp) that read positive floating point numbers into an array of capacity 100. The program will then ask for one of three letters(A, M or S). if the user inputs something other than one of these letters, then the program should ask for that input until an A, M, or S is entered. A do-while loop should be used for this. If the user inputs an A, then the program should...

  • Write a PYTHON program that allows the user to navigate the lines of text in a...

    Write a PYTHON program that allows the user to navigate the lines of text in a file. The program should prompt the user for a filename and input the lines of text into a list. The program then enters a loop in which it prints the number of lines in the file and prompts the user for a line number. Actual line numbers range from 1 to the number of lines in the file. If the input is 0, the...

  • Write a python program that does the following. a. It asks the user to enter a...

    Write a python program that does the following. a. It asks the user to enter a 5-digit integer value, n. b. The program reads a value entered by the user. If the value is not in the right range, the program should terminate. c. The program calculates and stores the 5 individual digits of n. d. The program outputs a “bar code” made of 5 lines of stars that represent the digits of the number n. For example, the following...

  • Task 1 Write a Python program that reads in any number of birth years until the...

    Task 1 Write a Python program that reads in any number of birth years until the number zero is entered. The program will then print out the average age and how old the youngest and oldest, respectively. For this task, you can start from the pseudo-code (separately) you received to get started. Example of program execution (user entries in numbers (year)): Enter year of birth. To finish, enter the number 0. Year: 1998 Year: 1932 Year: 1887 Error: Unreasonable year....

  • 3. (c-program) Write a program that finds the largest and smallest value in a series of...

    3. (c-program) Write a program that finds the largest and smallest value in a series of numbers entered by a user. The user must enter 25 values. Note if that if the user enters "0" they must correct and add another number. Print out the original entered values, the largest number, the smallest number. Note whether the user tried to enter "O".

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT