Question: What (if anything) is wrong with the following code? tot = 0 count = 0 grade = int(input(Enter the test grade or -1 to

What (if anything) is wrong with the following code? tot = 0 

What (if anything) is wrong with the following code? tot = 0 count = 0 grade = int(input("Enter the test grade or -1 to exit: ")) while grade != -1: tot += grade count += 1 if count > 0: print("Average is", tot/count) Explain your answer. A

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Syntactically there is no error and neither there is any logical error But if we e... View full answer

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 Programming Questions!