Loop Ex 4 - Average Score

Created By: M Ritter | Difficulty Level: 2

Description

An algorithm is required to find the average score for an exam a teacher gives their class. The algorithm should output the total of the scores, as well as the average score. The scores (out of 10) were: 5, 7, 10, 9, 8.

Puzzle

Drag from here

  • ENDFOR
  • SET total = 0
  • CALCULATE total = total + score[i]
  • NEXT i
  • FOR i = 0 TO scores.length - 1
  • DISPLAY total
  • END
  • BEGIN
  • CALCULATE average = total / scores.length
  • DISPLAY average
  • SET scores = [5, 7, 10, 9, 8]

Construct your solution here