Writeaprogramthataskstheusertoenterastudent’sgradesonfourexams.The program should display the four grades and the average of the four grades, round- ed to the nearest tenth. To add the grades, use a variable called total_grade, which you should initialize to zero. As the program prompts for and obtains each grade, add the grade to total_grade using the += operator.

total_grade=0fori=1to4readscore[i]totalgrade+=score[i]nextiaverage=total_score/4fori=1to4displayi,": ",score[i]nextidisplay"average: ",average

To write a program in Python that asks the user to enter a student's grades on four exams and then displays the four grades and their average rounded to the nearest tenth, you can follow these steps:

1. Initialize a variable called `total_grade` to zero to keep track of the sum of the grades.
2. Use a for loop to iterate four times, as there are four exams.
3. Prompt the user to enter the grade for each exam using the `input()` function.
4. Convert the input grade from a string to a float using the `float()` function.
5. Add the converted grade to the `total_grade` variable using the `+=` operator.
6. After the loop, calculate the average grade by dividing the `total_grade` by 4.
7. Round the average to one decimal place using the `round()` function.
8. Print the four grades and the rounded average to the user.

Here's the Python code that implements the above steps:

```python
total_grade = 0

for i in range(4):
grade = float(input("Enter the grade for Exam {0}: ".format(i+1)))
total_grade += grade

average_grade = round(total_grade / 4, 1)

print("\nThe four grades are:")
for i in range(4):
print("Exam {0}: {1}".format(i+1, round(grade, 1)))

print("\nThe average grade is:", average_grade)
```

By following these steps and running the code, you will be able to enter the four grades for the exams, see the grades you entered, and the rounded average of the four grades.