Final answer:
To calculate the average grade of three students using Python, collect grades with the input function, sum them, divide by three to find the average, and print the result.
Step-by-step explanation:
To calculate the average of grades for three students using Python, we can take input from the teacher for each student's grade, sum these grades, and then divide by the number of students to get the average. Here's a sample Python script that accomplishes this:
student_a = int(input('Enter grade for Student A: '))
student_b = int(input('Enter grade for Student B: '))
student_c = int(input('Enter grade for Student C: '))
grades_sum = student_a + student_b + student_c
grades_average = grades_sum / 3
print('The average grade is:', grades_average)
This code uses the input function to collect grades and calculates the grades_average which is then printed out.