Question 5

AQA Computer Science November 2020 Paper 1 (7517/1)A level13 marks

On the specification

5.1
3.1 Fundamentals of programming3.2 Fundamentals of data structures
5.2
3.3 Systematic approach to problem solving
Question text

5 Write a program that asks the user how many numeric digits they would like to enter and then gets the user to enter that number of numeric digits. The program should calculate and display the number of times the most frequently entered numeric digit was input. Example If the user says they are going to enter four digits and then enters the digits 3, 4, 5 and 3, the program should display the value 2 as the most frequently entered digit was 3 and that digit was entered twice. If more than one numeric digit had the same frequency and was the most frequently entered then instead of displaying the frequency, a message saying "Data was multimodal" should be displayed. A numeric digit is 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9 You may assume that the number that the user enters to state how many numeric digits there will be and the numeric digits entered by the user are all valid. Evidence that you need to provide Include the following evidence in your Electronic Answer Document. 5.1 Your PROGRAM SOURCE CODE. [12 marks] 5.2 SCREEN CAPTURE(S) showing the result of testing the program by entering: • the number 6 then the numeric digits 0, 1, 2, 1, 2 and 1 • the number 5 then the numeric digits 0, 1, 2, 2 and 1 [1 mark] You are advised to spend no more than 15 minutes on this section. Type your answers to Section C into your Electronic Answer Document. You must save this document at regular intervals. These questions refer to the Preliminary Material and the Skeleton Program, but do not require any additional programming. Refer either to the Preliminary Material issued with this question paper or your electronic copy.