Final answer:
To write a program that prompts the instructor to enter the student's name and the number of average grades to calculate, you can use a loop to repeat the process for each student.
Step-by-step explanation:
To write a program that prompts the instructor to enter the student's name and the number of average grades to calculate, you can use a loop to repeat the process for each student. Here is an example:
num_students = int(input('Enter the number of students: '))
for i in range(num_students):
name = input('Enter student's name: ')
num_grades = int(input('Enter the number of grades: '))
grades = []
for j in range(num_grades):
grade = float(input(f'Enter grade {j+1}: '))
grades.append(grade)
average = sum(grades) / num_grades
print(f'Student Name: {name}')
print(f'Grades: {grades}')
print(f'Average: {average}')
print() # Print a blank line
This program allows the instructor to enter the student's name, the number of grades to calculate, and the actual grades. It then calculates the average of the grades and displays the student's name, the individual grades entered, and the average.