A developer uses the identifier total_interest_rate instead of x in their program code. Why is the use of meaningful identifier names considered good practice in programming?
AQA A Level · Computer Science 7517
Data types, variables and operations: Practice Questions
5 multiple-choice questions marked as you go, and 5 written questions with worked solutions. All on Data types, variables and operations.
A string S has the value "AQA_CS_2024". What is the result of the operation SUBSTRING(4, 2, S)?
(Assume the first character is at position 0, and the parameters are: start index, length)
In the context of the Unified Modelling Language (UML) for Object-Oriented Design, how are composition and aggregation relationships visually distinguished in a class diagram?
In a programming language, the operation 17 MOD 5 is performed. What is the result of this integer division remainder operation?
Consider a functional programming context. Given a list \( [4, 3, 5] \), which of the following represents the list using head:tail notation?
In a programming language, what is the result of the operation \( 17 \text{ DIV } 5 \)?
Write your answer out first, then check it against the worked solution.
A string variable s has the value "AQA2024". What is the result of the operation SUBSTRING(s, 0, 3)? (Assume 0-based indexing and that the third parameter is length).
Write your answer out first, then check it against the worked solution.
In Object-Oriented Programming, a class Car and a class Engine are related such that the Engine is a part of the Car, and if the Car is destroyed, the Engine is also destroyed. Name this specific type of relationship.
Write your answer out first, then check it against the worked solution.
A subroutine is defined to calculate the area of a circle using the formula \( Area = \pi \times r^2 \).
(a) Define the term subroutine.
(b) Explain the difference between a procedure and a function.
Write your answer out first, then check it against the worked solution.
Consider the following pseudocode snippet:x = "AQA Computer Science"y = 7
(a) Describe the result of the following string operations:
i. substring(0, 3) of x
ii. length of x
(b) Explain the difference between global variables and local variables, stating why using local variables is considered good practice.
Write your answer out first, then check it against the worked solution.
* The content provided by thinka is generated by AI and may not always be accurate or up-to-date. Please use it as a supplementary resource and verify with official materials.
You've seen the model answer. Now get yours marked.
This page can show you how a good answer looks. It cannot tell you what your answer was missing. thinka marks your written work against the real mark scheme in about 15 seconds.
Want more questions like these? Get a fresh set on this topic, marked as you go.
Practise More