Question: 3. Write a function to calculate an average test grade. Name the function test grade average. The function will have one input, number of tests,

3. Write a function to calculate an average test grade. Name the function test grade average. The function will have one input, number of tests, and one output, with the input being the number of test grades, and the output the average called test average. Create a for loop cycling over the specified number of tests and use the input function inside the loop to prompt the user for each value, maintaining a running sum inside the loop. Create a script that prints out the test average. Print the answer with one decimal place. Write the function so it looks like this example when you run it: >> test_grade average(5) Enter value: 83 Enter value: 92 Enter value: 75 Enter value: 100 Enter value: 33 Test average is 76.6 3. Write a function to calculate an average test grade. Name the function test grade average. The function will have one input, number of tests, and one output, with the input being the number of test grades, and the output the average called test average. Create a for loop cycling over the specified number of tests and use the input function inside the loop to prompt the user for each value, maintaining a running sum inside the loop. Create a script that prints out the test average. Print the answer with one decimal place. Write the function so it looks like this example when you run it: >> test_grade average(5) Enter value: 83 Enter value: 92 Enter value: 75 Enter value: 100 Enter value: 33 Test average is 76.6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
