AQA A-Level Computer Science - Fundamentals of Programming Revision Questions and Answers
Constants They are variable whose values will not be changed by the program. What are the advantages of having constants? - Improves the readability of code - Easier to update the programming code if the value changes - Reduce the likelihood of inconsistency causing errors if multiple places use the same value instead of using the same constant. Concatenation It is the joining of character strings end to end. For Example: "Hello, " "world" could equal "Hello, world" Split() For Example: x = 'blue,red,green' (",") Exception Handling It is the process of what code does when exception happens during execution, so that the code will not simply crash. Makes the program robust Defensive programming It is ensuring the continuing function of a piece of software under foreseen circumstances. Subroutines They are segments of code that perform a specific purpose in a program What do subroutines allow programmers to do? - To organise their code in easy to follow manner - To debug their code easily by focusing on one subroutine at a time - To reduce code redundancy - To increase code efficiency Procedures They are subroutines that do not return any values after execution. Functions They are subroutines that do return values after execution Object Oriented Programming A programming paradigm that models objects with attributes and behaviours
Document information
- Uploaded on
- June 3, 2024
- Number of pages
- 3
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers