Paper 1 Flashcards

(79 cards)

1
Q

What are some supported programming languages in AQA AS and A-level Computer Science?

A

C#, Java, Python, VB.Net

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which programming language version is no longer supported in the curriculum?

A

Python 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What concept of data types involves variables used as stores for memory addresses of objects created at runtime?

A

Pointer or reference data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Name the three basic combining principles in imperative programming languages.

A

Sequence, iteration/repetition, selection/choice

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the types of iteration mentioned in the curriculum?

A

Definite and indefinite iteration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

List arithmetic operations familiar in programming languages.

A

Addition, subtraction, multiplication, real/float division, integer division, exponentiation, rounding, truncation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What relational operations should students be familiar with?

A

Equal to, not equal to, less than, greater than, less than or equal to, greater than or equal to

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which Boolean operations are students expected to know?

A

NOT, AND, OR, XOR

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the difference between a variable and a constant?

A

Variables can change; constants have fixed values, and named constants are advantageous for readability and maintenance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Name some string-handling operations students should be familiar with.

A

length, string to integer, position, substring, integer to string, concatenation, float to string, character code conversions, date/time to string, string conversion operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What concept is used for generating random numbers in programming?

A

Random number generation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is exception handling in programming?

A

A technique to handle runtime errors and exceptions gracefully.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a subroutine or procedure in programming?

A

A named ‘out of line’ block of code that can be called/executed by its name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are parameters in subroutines used for?

A

To pass data within programs to the subroutine.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does a subroutine return to the calling routine?

A

A value or values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are local variables in subroutines?

A

Variables that exist only during execution of the subroutine and are accessible only within it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How do local variables differ from global variables?

A

Local variables are limited to the subroutine, while global variables are accessible throughout the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the purpose of a stack frame in subroutine calls?

A

To store return addresses, parameters, and local variables during a subroutine call.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are recursive techniques in programming?

A

Using functions that call themselves to solve problems, including understanding base cases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Name the character of the procedural programming paradigm.

A

Structured, step-by-step approach to program design and construction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What are some concepts of object-oriented programming?

A

Class, object, encapsulation, inheritance, aggregation, composition, polymorphism, overriding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is encapsulation in object-oriented programming?

A

The hiding of internal object details and only exposing necessary parts through methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Why use object-oriented programming?

A

To organize code around objects, promote reuse, and manage complexity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

In class diagrams, what does a solid line represent?

A

Inheritance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What are data structures?
Ways to organize and store data for efficient access and modification.
26
What are arrays used for in programming?
Representing vectors or matrices, useful in simple problem solutions.
27
What is a record?
A collection of fields of data grouped together.
28
What are abstract data types (ADTs)?
High-level descriptions of data structures like queues, stacks, graphs, etc.
29
Name three types of queues.
Linear, circular, priority.
30
What is a stack?
A Last-In-First-Out (LIFO) data structure.
31
What operations can be performed on stacks?
push, pop, peek/top, test for empty or full.
32
What is a graph?
A data structure to represent complex relationships between entities.
33
What is a rooted tree?
A tree with one designated root node, with parent-child relationships.
34
What is a binary tree?
A rooted tree where each node has at most two children.
35
What is a hash table?
A data structure that maps keys to values with hashing.
36
What is a collision in hash tables?
When two keys hash to the same index, causing conflicts.
37
What is a dictionary in programming?
A collection of key-value pairs for data retrieval.
38
What notation is used to represent a list of numbers in a vector in the AQA specification?
[2.0, 3.14159, -1.0, 2.718281828]
39
How can a 4-vector over ℝ be written as a dictionary in Python?
{0:2.0, 1:3.14159, 2:-1.0, 3:2.718281828}
40
What does vector addition achieve in vector operations?
Translation
41
What is scalar-vector multiplication used for in vectors?
Scaling
42
What is a convex combination of two vectors u and v?
An expression of the form αu + βv where α, β ≥ 0 and α + β = 1
43
How do you find the dot product of two vectors u and v?
u ∙ v = u1v1 + u2v2 + ... + unvn
44
What is the key purpose of a depth-first search algorithm?
Navigating a maze
45
What is an in-order tree traversal primarily used for?
Outputting the contents of a binary search tree in ascending order
46
What is the main advantage of converting infix expressions to Reverse Polish Notation (RPN)?
Eliminates need for brackets in sub-expressions
47
What is the time complexity of binary search?
O(log n)
48
What sorting algorithm exemplifies 'divide and conquer' approach?
Merge sort
49
What is the typical time complexity of bubble sort?
O(n^2)
50
What is Dijkstra’s shortest path algorithm used for?
Finding the shortest path in a graph
51
What does an algorithm always consist of?
A sequence of steps that terminates
52
What is the purpose of abstraction in computer science?
To create simplified models by removing unnecessary details or grouping by characteristics
53
What is procedural abstraction?
It represents a computational method, or procedure
54
What does data abstraction enable us to do?
Hide implementation details of data objects, allowing construction from previously defined types
55
What is a finite state machine (FSM)?
A model used for describing computations with states and transitions
56
What notation is used in set comprehensions in Python?
{x | x ∈ ℕ ∧ x ≥ 1}
57
What does the symbol Ø represent in set theory?
The empty set
58
What is a language called if it can be described by a regular expression?
Regular language
59
What is the significance of Backus-Naur Form (BNF)?
It can represent some languages that regular expressions cannot
60
How can algorithms be compared?
By their complexity as a function of problem size
61
What is a set?
An unordered collection of values where each value occurs at most once
62
What does the symbol ⊂ indicate?
Proper subset of
63
What does the set operation A ext B represent?
The set of elements in A that are not in B (set difference)
64
What does the regular expression * represent?
Zero or more repetitions of the preceding element
65
What character in regular expressions represents a choice between patterns?
| (alternation)
66
What type of languages can FSMs accept?
Regular languages
67
What is a linear function?
A function that graphs as a straight line, e.g., y = 2x
68
Give an example of a polynomial function.
y = 2x^2
69
What is an exponential function?
A function where the variable appears as an exponent, e.g., y = 2^x
70
How is the number of permutations of n distinct objects calculated?
n factorial (n!)
71
What does Big-O notation express?
The time complexity of an algorithm
72
Name the growth requirements categorized by Big-O notation.
Constant, logarithmic, linear, polynomial, exponential
73
What limits what can be computed?
Algorithmic complexity and hardware limitations
74
What are tractable problems?
Problems that have a polynomial or less time solution
75
What characterizes intractable problems?
problems that are theoretically solvable, but for which no known efficient algorithm (polynomial time or less) exists to find a solution
76
Can all problems be solved algorithmically?
No, some problems are non-computable.
77
What is the Halting problem?
An unsolvable problem of determining whether a program will stop or not for a given input.
78
What is a Turing machine?
A theoretical machine with a fixed program that performs simple computations.
79
Describe the components of a Turing machine.
States, symbols, an infinite tape, and a read-write head