← Back to Loops
Question 360
Average With A Loop
Average With A Loop
Four grades are read into a list. Use one for loop to build both the running total and a count of how many grades there are (do not use sum() or len()), then print the average to two decimals in the form Average: <value> using :0.2f. Input: four lines, each a whole number, no prompts.
Expected Output:
Average: 84.00= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
Loops
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.