Question 6
AQA Computer Science June 2023 Paper 1 (7517/1)A level13 marks
On the specification
- 6.1
- 3.1 Fundamentals of programming4.5 Fundamentals of data representation
- 6.2
- 3.3 Systematic approach to problem solving
Question text
6 Write a program that gets the user to enter a string. It should keep getting the user to enter a string until they enter a valid string. Each time they enter a string an appropriate message should be displayed telling them whether the string they entered is valid or not. For a string to be valid: • it must be between five and seven characters in length (inclusive) • it must consist only of uppercase letters • it must contain only unique characters (ie no character appears in the string more than once) • the sum of the ASCII codes of the characters in the string must be between 420 and 600 (inclusive). Evidence that you need to provide Include the following evidence in your Electronic Answer Document. 6.1 Your PROGRAM SOURCE CODE [12 marks] 6.2 SCREEN CAPTURE(S) showing the results of testing the program by entering the strings BOIL, BRAisE, ROAST, BLANCH and PRESSURECOOK. You will need to execute your program more than once to test all of the strings. [1 mark] You are advised to spend no more than 20 minutes on this section. Enter your answers to Section C in 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.