Difference between revisions of "2023 A Level"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
(Question)
(Question)
 
Line 9: Line 9:
 
* It must consist only of uppercase characters
 
* It must consist only of uppercase characters
 
* It must contain only unique characters (ie no character should appear in the string more than once)
 
* It must contain only unique characters (ie no character should appear in the string more than once)
* the sum of the ASCII codes for the characters in the string must be between 420 and 600 (inclusive)
+
* The sum of the ASCII codes for the characters in the string must be between 420 and 600 (inclusive)
  
 
= Evidence you need to provide=
 
= Evidence you need to provide=
 
# Your Program Source Code
 
# Your Program Source Code
 
# Screen Capture(s) showing the results of testing your program by entering BOIL, BRAisE, ROAST, BLANCH, and PRESSURECOOK. You will need to execute your program more than once to test all of the strings.
 
# Screen Capture(s) showing the results of testing your program by entering BOIL, BRAisE, ROAST, BLANCH, and PRESSURECOOK. You will need to execute your program more than once to test all of the strings.

Latest revision as of 10:41, 6 February 2024

Question

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 is valid or not.

For a string to be valid:

  • It must be between 5 and 7 characters in length (inclusive)
  • It must consist only of uppercase characters
  • It must contain only unique characters (ie no character should appear in the string more than once)
  • The sum of the ASCII codes for the characters in the string must be between 420 and 600 (inclusive)

Evidence you need to provide

  1. Your Program Source Code
  2. Screen Capture(s) showing the results of testing your program by entering BOIL, BRAisE, ROAST, BLANCH, and PRESSURECOOK. You will need to execute your program more than once to test all of the strings.