Question 1 (20 marks)
There are 2700 learners in a cluster of schools. These learners wrote a programming test and their test scripts have been scored. The script of each learner indicates the name, age and gender of the learner. To pass the test, a learner must have a minimum test score of 50.
Write a for-loop pseudocode that reads the name, age, gender and test score of each learner and outputs the names, the average test score, and the average age of only the female learners that passed the test.
Question 2 (8 marks)
Agnes plays a stay-at-home game of throwing a weighted coin that is more likely to result in heads than in tails. Each time a throw results in heads, Agnes gives herself a score of 5. As soon as a throw results in tails, the game stops.
Draw a flowchart that reads the outcome of each throw and outputs the total score that Agnes gets.
Get Free Quote!
443 Experts Online