In python:
first_grade = float(input("Please input the first grade "))
second_grade = float(input("Please input the second grade "))
third_grade = float(input("Please input the third grade "))
print("The average of the three grades is {}".format( round((first_grade + second_grade + third_grade) / 3,2)))