Question: write a code can run in page 2 when I put 3-5 number it will give me a ave number Prep Problem - 12 In
write a code can run in page 2 when I put 3-5 number it will give me a ave number


Prep Problem - 12 In this problem, you should write one function named average_numbers. This function should have one parameter variable. You can assume that the value passed to the parameter will be an integer, representing the number of numbers to average. The function will repeatedly ask the user for that many numbers, and then calculate and print the average. Below are two examples of this function being called. The first would be an example of the function being called with 2 as the argument, and the second with 5 as the argument Number : 5 Number: 10 Average = 7.5 Number: 20 Number : 70 Number : 85 Number: 10 Number : 5 Average = 38.0 Use the round function to round the result to two decimal places. You may call the functions in your code in order to test. However, you should remove all calls to the function before you submit to gradescope. The gradescope tests will call the functions to test them. Name the program prep12. py. Make sure that gradescope gives you the points for passing the test case. Autograder Results Results Code average-3-5-7-9 (0.0/1.0) Your output on left, expected output on right Lines beginning with a 'y indicates a line that differs from the expected output >A problem occurred: Runtime Error Number: Your program produced an error when it's running. Number: You will be able to get more details when debugging on your device. Number: Please try to address the issue, and submit again. Number: Average = 6.0 average-2-5-10 (0.0/1.0) Your output on left, expected output on right Lines beginning with a indicates a line that differs from the expected output >A problem occurred: Runtime Error Number: > Your program produced an error when it's running. Number: > You will be able to get more details when debugging on your device. Number: > Please try to address the issue, and submit again. Average = 5.67 average-3-10-50-90 (0.0/1.0) Your output on left, expected output on right Lines beginning with a > indicates a line that differs from the expected output >A problem occurred: Runtime Error Number: > Your program produced an error when it's running. Number: > You will be able to get more details when debugging on your device. Number: ddress the iccu and cubmit 20 in Please try to Numbor
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
