AQA A LEVEL Computer Science PAPER 2
AQA A LEVEL Computer Science PAPER 2 (a) Write the function getText (b) The procedure, fullStop, needs to: • ask for a file name as input • read the data from the file using the function getText • replace the first letter after each full stop with a capital letter if it is currently lower case (if the next character is a space, it must check each successive character until it finds a letter) • write the edited data back to the text file. You can assume the text file only contains upper and lower case letters, spaces and full stops. Part of the ASCII table has been provided: ASCII Value Character 65 "A" 90 "Z" 97 "a" 122 "z" 32 " " (space) 46 "." (full stop) The following functions may be used in your answer: asc(character) returns the ASCII value for a single character, e.g. asc("A") would return 65. upper(character) returns the single character in upper case, e.g. upper("a") would return “A”. Write the procedure fullStop.
Written for
- Institution
- AQA A LEVEL
- Course
- AQA A LEVEL
Document information
- Uploaded on
- July 3, 2023
- Number of pages
- 38
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
aqa a level computer science paper 2
-
2023 aqa a level computer science paper 2
-
aqa a level computer science
Also available in package deal