Question: In Python, please advise. I keep getting various errors no matter how I change the variable names and/or code and although this question has been

In Python, please advise. I keep getting various errors no matter how I change the variable names and/or code and although this question has been asked several times, I'm including errors that are directly from the book/program regarding my code.

Here is the question:

You want to know your grade in Computer Science, so write a program that continuously takes grades between 0 and 100 to standard input until you input "stop", at which point it should print your average to standard output.

NOTE: When reading the input, do not display a prompt for the user. Use the input() function with no prompt string. Here is an example: grade = input()

This is my code:

total = 0 count = 0 grade = int(input())

while grade != "stop": grade = int(input()) count += 1 total += grade average = total/count

print(average)

These are the errors I've received:

-Correct solutions that use grade tend to also use +

-Solutions with your approach don't usually use: count

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!