Question 5
AQA Computer Science June 2019 Paper 1A level13 marks
On the specification
- 5.1
- 3.1 Fundamentals of programming
- 5.2
- 3.3 Systematic approach to problem solving
Question text
5 Write a program that gets two words from the user and then displays a message saying if the first word can be created using the letters from the second word or not. For example: • The word EAT can be formed from the word ATE as the first word uses one E, one A and one T and the second word also contains one of each of these letters. • The word EAT can be formed from the word HEART as the second word contains one E, one A and one T which are the letters needed to form the first word. • The word TO can be formed from the word POSITION as the second word contains one T and (at least) one O which are the letters needed to form the first word. • The word MEET cannot be formed from the word MEAT as the second word only contains one E and two Es are needed to form the first word. You may assume that the user will only enter words that consist of upper case letters. 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 word NINE followed by the word ELEPHANTINE. • the word NINE followed by the word ELEPHANT. [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.