Question: Edit the program provided so that it receives a series of numbers from the user and allows the user to press the enter key to

 Edit the program provided so that it receives a series of

Edit the program provided so that it 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 The average of the numbers An example of the program input and output is shown below: Enter a number or press Enter to quit: 1 Enter a number or press Enter to quit: 2 Enter a number or press Enter to quit: 3 Enter a number or press Enter to quit: The sum is 6.0 The average is 2.0 Program produces the correct output given input 1 out of 5 checks passed. Review the results below for more details. Checks Test CaseComplete Test for 1, 2, 3 Input 1 2 3 Output Enter a number: 1 Enter the next number: 2 Enter the next number: 3 Enter the next number: The sum is 6.0 The average is 2.00 Results The sum is 6\.0\s*The average is 2\.0 Test CaseIncomplete Test for 12, 13, 14, 27 Input 12 13 14 27 Output Enter a number: 12 Enter the next number: 13 Enter the next number: 14 Enter the next number: 27 Enter the next number: The sum is 66.0 The average is 16.00 Results The sum is 66\.0\s*The average is 16\.5 Test CaseIncomplete Test for 100, 59, 37, 21 Input 100 59 37 21 Output Enter a number: 100 Enter the next number: 59 Enter the next number: 37 Enter the next number: 21 Enter the next number: The sum is 217.0 The average is 54.00 Results The sum is 217\.0\s*The average is 54\.25 Test CaseIncomplete Test for 0, 45, 32 Input 0 45 32 Output Enter a number: 0 Enter the next number: 45 Enter the next number: 32 Enter the next number: The sum is 77.0 The average is 25.00 Results The sum is 77\.0\s*The average is 25\.666666666666668 Test CaseIncomplete Test for -23, 45, 67 Input -23 45 67 Output Enter a number: -23 Enter the next number: 45 Enter the next number: 67 Enter the next number: The sum is 89.0 The average is 29.00 Results The sum is 89\.0\s*The average is 29\.666666666666668

Edit the program provided so that it 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: 1. The sum of the numbers 2. The average of the numbers An example of the program input and output is shown below: Enter a number or press Enter to quit: 1 Enter a number or press Enter to quit: 2 Enter a number or press Enter to quit: 3 Enter a number or press Enter to quit: The sum is 6.0 The average is 2.0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!