Texts:
3. (a) Using a flowchart, design a guessing game algorithm with the following specifications: The player has to guess a number between 1 and 10. The player has a maximum of 3 guesses. The player wins when they guess the right number. If the player does not guess the number, they lose. (15 marks)
(b) Using a flowchart, design an algorithm that reads in a positive decimal integer (i.e. a whole number, base 10) and counts the number of digits. For example, 845 (eight hundred and forty-five) has three digits: 8, 4, and 5 - so the algorithm should return a count of three. (15 marks)
4. (a) Design an algorithm in pseudocode that reverses the order of the elements in a given array, A. For example: [5, 1] goes to [1, 5]. (15 marks)
(b) Using a flowchart, design an algorithm that reads in an array, A, and uses a loop to find the average (mean) value of the elements. (15 marks) (total 30 marks)