Write an algorithm to evaluate the average height in class. Get the lengths of the class from the user. Trace your program and show your results.

wait - we doing heights or lengths?

anyway, average = sum/count

1. Start

2. Initialize a variable named "totalHeight" to 0.
3. Initialize a variable named "numberOfStudents" to 0.
4. Get the number of students in the class from the user and store it in "numberOfStudents".
5. Repeat step 6 to step 8 for each student in the class.
6. Get the height of the student from the user.
7. Add the height to "totalHeight" variable.
8. Increment "numberOfStudents" by 1.
9. Calculate the average height by dividing "totalHeight" by "numberOfStudents" and store it in a variable named "averageHeight".
10. Display the calculated average height.
11. End.

Trace:

Enter the number of students in the class: 5

Student 1 height: 160
Student 2 height: 155
Student 3 height: 170
Student 4 height: 165
Student 5 height: 175

Average height: (160 + 155 + 170 + 165 + 175) / 5 = 825 / 5 = 165

To write an algorithm to evaluate the average height in a class, you can follow these steps:

1. Initialize a variable `total_height` to 0 to store the sum of heights.
2. Initialize a variable `num_students` to 0 to keep track of the number of students in the class.
3. Ask the user to enter the number of students in the class.
4. Start a loop that will iterate `num_students` times.
5. Within the loop, ask the user to enter the height of each student.
6. Add the entered height to the `total_height` variable.
7. Increment the `num_students` variable by 1.
8. After the loop, calculate the average height by dividing the `total_height` by `num_students`.
9. Display the average height to the user.

Here's the algorithm in a pseudocode representation:

```
total_height = 0
num_students = 0

num_students = input("Enter the number of students in the class: ")

for i in range(num_students):
height = input("Enter the height of student " + (i+1) + ": ")
total_height = total_height + height
num_students = num_students + 1

average_height = total_height / num_students

display("The average height in the class is: " + average_height)
```

To trace the program, you would need to run the algorithm using a programming language and input some sample values for testing. By inputting the lengths of the class and following the steps above, you will obtain the average height as the final result.