AQA A-level Computer Science Precourse Test: Data Types, Structures, and Concepts, Exams of Computer Science

A comprehensive overview of fundamental computer science concepts, including data types, data structures, and programming principles. It covers essential topics such as integers, real numbers, booleans, characters, strings, pointers, records, arrays, and user-defined data types. The document also explores programming concepts like variable declaration, constant declaration, assignment, iteration, selection, subroutines, recursion, and exception handling. It further delves into data structures like stacks, queues, and graphs, explaining their operations and applications. This resource is valuable for students preparing for the aqa a-level computer science exam.

Typology: Exams

2024/2025

Available from 01/08/2025

BrighterSources
BrighterSources ๐Ÿ‡บ๐Ÿ‡ธ

4

(1)

934 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Computer science AQA A-level
Precourse Test 100%
What is an integer? - A positive or negative whole number
What is a Real or Float number? - A positive or negative number that can have a
fractional part.
What is a Boolean? - True or False
What is a character? - A single letter, number or symbol
What is a string? - A group of characters
What is Date/Time? - A way of storing Date/Time
What is a pointer? - A way of storing a memory address.
What is a record? - A collection of related fields, each of which could hold a different
data type.
What is an array? - A finite, indexed set of related elements of the same data type.
What is a user defined data type? - A data type derived from existing data types in order
to create a customized data structure.
What is variable declaration? - Creating a variable for the first time. giving it a name and
sometimes a data type.
What is constant decleration? - Creating a constant for the first time.
What is assignment? - giving a constant or a variable a value.
what is iteration? - repetition of a process e.g. a while or for loop. this could be definite
or indefinite.
What is selection? - comparing values and then choosing an appropriate action. e.g. an
if statement.
what is a subroutine? - A named block of code containing a set of instructions designed
to perform a frequently used operation.
What is definite iteration? - the number of repititions is known before the loop starts.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download AQA A-level Computer Science Precourse Test: Data Types, Structures, and Concepts and more Exams Computer Science in PDF only on Docsity!

Computer science AQA A-level

Precourse Test 100%

What is an integer? - A positive or negative whole number What is a Real or Float number? - A positive or negative number that can have a fractional part. What is a Boolean? - True or False What is a character? - A single letter, number or symbol What is a string? - A group of characters What is Date/Time? - A way of storing Date/Time What is a pointer? - A way of storing a memory address. What is a record? - A collection of related fields, each of which could hold a different data type. What is an array? - A finite, indexed set of related elements of the same data type. What is a user defined data type? - A data type derived from existing data types in order to create a customized data structure. What is variable declaration? - Creating a variable for the first time. giving it a name and sometimes a data type. What is constant decleration? - Creating a constant for the first time. What is assignment? - giving a constant or a variable a value. what is iteration? - repetition of a process e.g. a while or for loop. this could be definite or indefinite. What is selection? - comparing values and then choosing an appropriate action. e.g. an if statement. what is a subroutine? - A named block of code containing a set of instructions designed to perform a frequently used operation. What is definite iteration? - the number of repititions is known before the loop starts.

What is indefinite iteration? - the number of repititions is not known before the loop starts. What is a nested structure? - One structure is placed within another. Easily identified by indentation. What is meant by meaningful identifier names? - Giving constants, variables and subroutines sensible and meaningful identifier names. What does the real/float division operator do? - divides one number by the other. What does the integer division operator do? - divides one number by the other but only returns the whole number part. What does the modulo operator do? - returns the remainder of an integer division. What does the exponentiation operator do? - raises one value to the power of another. What does the rounding operator do? - limits the degree of accuracy of a number. (rounds up or down) What does the truncation operator do? - removes the decimal part of a number. (never rounds up) what does the string handling function "Length" do? - Returns the number of characters in a specified string. what does the string handling function "position" do? - returns the position of a specified character within a string. what does the string handling function "concatenation" do? - joins two or more strings together to form a new and longer string. Is a function required to return a value? - yes is a procedure required to return a value? - no what can stack frames store for each subroutine? - Return addresses Parameters Local variables what is a recursive subroutine? - a subroutine defined in terms of itself. what two conditions must a recursive subroutine meet in order for the program to run correctly. - it must have a stopping condition/base case. this stopping condition must be met at some point.

local variables What is meant by a recursive subroutine. - a subroutine defined in terms of itself. What is meant by a base case. - the terminating situation in recursion. it does not use recursion to produce a result. What scope is a variable that can be accessed from all parts of a program? - global scope list 4 types of basic structure used in the structured approach to program design and construction. - Assignment sequence selection iteration what do rectangles represent in hierarchy charts? - procedures How is data stored in procedural programs? - Constants and variables. What name is given to containers for data and instructions In object oriented programming? - Objects. In object-oriented programming, what specifies the properties and methods that objects have? - Classes In class diagrams which type of line represents aggregation? - unfilled diamond. In class diagrams which type of line represents composition? - filled diamond. What are data structures - containers within which information is stored by computers. What three things must an array be. - Finite indexed Only hold elements of same data type. To represent a table what type of array would you use? - a 2-dimensional array. What is an abstract data type/data structure? - a data structure that makes use of other data structures to form a new way of storing data. What is a queue? - an abstract data structure based on an array. A FIFO (first in first out) abstract data type. An example of where queues are used in computer systems? - keyboard buffers, each key press is added to the queue.

Which search algorithm uses a queue to keep track of which nodes have been visited? - breadth first. What abstract data structure does a breadth first search algorithm use to keep track of which nodes have been visited? - A queue How many pointers does a linear queue have? - 2 Where are the pointers located in a linear queue? - front and rear of the queue. What operation adds a value into a queue? - enqueue What operation removes a value into a queue? - dequeue When a value is enqueued into a queue where is it entered? - at the rear. When a value is dequeued from a queue where is it removed from? - the front. What are the 4 operations that can be performed to a queue? โ€“ enqueue dequeue isfull isempty If a queue has no content what does the operation isfull return for that queue? - false If a queue has no content what does the operation isempty return for that queue? - true If a queue has no available positions behind the front pointer what does the operation isfull return for that queue? - true If a queue has available positions behind the front pointer what does the operation isfull return for that queue? - false How is emptiness detected in a queue? - if the front and rear pointer are at the same position the queue is empty. What is an advantage to a circular queue? - more memory efficient. What is the difference between circular and linear queues? - in a circular queue the front and rear pointers can move over the two ends of the queue. How does a priority queue work? - items are assigned a priority, items with the highest priority are dequeued first.

Two ways a graph can be represented? - an adjacency matrix or an adjacency list What is an adjacency matrix? - a tabular representation of a graph where each node is assigned a row and a column. In an adjacency matrix what does a 1 represent? - that there is an edge between the two nodes in an adjacency matrix what does a 0 represent? - that there is no edge between the two nodes. In an adjacency matrix for a weighted graph what do the numbers in the table represent? - the weight of that edge between the two nodes. If no edge connects two nodes what will be present in that cell in a weighted adjacency matrix? - an infinity symbol What is an adjacency list? - each node on the graph is placed into a list with all the adjacent nodes listed next to it. Which is more memory efficient adjacency matrix or adjacency list? - adjacency list Which is more time efficient adjacency matrix or adjacency list? - adjacency matrix Which is more time efficient adjacency matrix or adjacency list? - adjacency matrix Which is more suited to represent dense graphs adjacency matrix or adjacency list? - adjacency matrix Which is more suitable for dense graphs with lots of edges? adjacency matrix or adjacency list? - adjacency matrix Which is more suited to representing less dense graphs? - adjacency list Which is more suitable for less dense graphs with few of edges? adjacency matrix or adjacency list? - adjacency list Advantages of using an adjacency matrix to represent a graph? - it is more time efficient when looking if a particular edge as it can be looked up via its row and column. Advantages to using an adjacency list compared to an adjacency matrix to represent a graph. - it's more memory efficient as it only stores edges that exist in the graph. Advantages to using an adjacency matrix compared to an adjacency list to represent a graph. - it's more time efficient as it allows specific edges to be queried easily via looking up its row and column.

Disadvantages to using an adjacency list compared to an adjacency matrix to represent a graph. - it's slow to query as you must search the list sequentially to find a specific edge. Disadvantages to using an adjacency matrix compared to an adjacency list to represent a graph. - it takes up more memory as it stores edges that don't exist and half the data is repeated. What is a tree graph? - a connected, undirected graph with no cycles. What 3 properties must a tree graph have? - it must be connected, undirected and have no cycles. What is a rooted tree graph? - a tree with a root node from which all the other nodes stem. What is a parent node in a tree graph? - a node from which other nodes stem from. What is a root node in a tree graph? - a node with no parent nodes. What is a child node in a tree graph? - a node which stems from another. What is a child node with no child nodes stemming from it called in a tree graph? - a leaf. What is a binary tree? - a rooted tree in which each parent node has no more than 2 child nodes. What's a use of a rooted tree graph? - to represent file systems or a family. What is a hash table? - a table that stores the data using a value and a key which is calculated using a hashing algorithm. Using hash tables what is the constant time complexity of retrieving data using big O notation. - O(1) How does a hashing algorithm work? - it takes an input and returns a hash which is unique to its input and cannot be reversed to retrieve the input value. How are values looked up in a hashing table? - the desired value is inputted and hashed and the position in the table corresponding to that hash is queried. What is a collision in a hash table? - when two values produce the same hash and data in the table could be overwritten.

What abstract data type does a depth first graph traversal algorithm use? - a stack (LIFO) An example where you would use depth first traversal? - navigating a maze. What abstract data structure does breadth first graph traversal algorithm use? - a queue (FIFO) What is a breadth first graph traversal algorithm used for? - determining the shortest path on an unweighted graph. What is tree traversal? - the process of visiting/updating/outputting each node in a tree. What are the three tree traversal algorithms? โ€“ pre-order in-order post-order Tree traversal are an example of what graph traversal algorithm? - depth first. Which types of tree traversal can be performed on any tree? - pre order and post order Which type of tree traversal can only be performed on binary trees? - in-order True or False: tree traversal is unique to trees and cannot be performed on other types of graphs - True, they are unique to trees, must start at the root and travel left down the tree. depth first. What is pre-order traversal used for? - copying a tree. what is in-order traversal used for? - outputting the contents of a binary search tree in ascending or alphabetically order. what is post-fix used for? - for infix to reverse polish notation conversions, infix to postfix. What is a set? - a collection of unordered values with no duplicates. What does it mean if a problem is intractable? - the problem can't be solved in a polynomial time complexity. it takes an unreasonable amount of time to solve. What is an example of a intractable problem? - the traveling salesman problem. if a problem is intractable what approach may a programmer take? - a heuristic approach

What is a heuristic approach to solving a problem? - employing a method of finding a solution that may not be the best. what is a universal Turing machine? - A Turing machine that can simulate the behaviour of any other Turing machine and can compute any computable sequence. what symbol represents a Natural number? - N what symbol represents an integer? - Z what symbol represents rational numbers? - Q what symbol represents real numbers? - R Benefits of programming in oop? โ€“ clear structure to the program developing and testing is easier team projects are easier classes can be reused space efficient. What is the design principle encapsulate what varies? - requirements likely to change are encapsulated in a class. future changes are easily made. What is the design principle favour composition over inheritance? - wherever possible use composition instead of inheritance. composition is more flexible. What is the design principle programs to interface not implementation? โ€“ allows unrelatedclasses to make use of similar methods. an interface is a collection of abstract procedures that can be implemented by unrelated classes.