Computer science AQA A-level Paper 1

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/202

flashcard set

Earn XP

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

203 Terms

1
New cards

What is an integer?

A positive or negative whole number

2
New cards

What is a Real or Float number?

A positive or negative number that can have a fractional part.

3
New cards

What is a Boolean?

True or False

4
New cards

What is a character?

A single letter, number or symbol

5
New cards

What is a string?

A group of characters

6
New cards

What is Date/Time?

A way of storing Date/Time

7
New cards

What is a pointer?

A way of storing a memory address.

8
New cards

What is a record?

A collection of related fields, each of which could hold a different data type.

9
New cards

What is an array?

A finite, indexed set of related elements of the same data type.

10
New cards

What is a user defined data type?

A data type derived from existing data types in order to create a customized data structure.

11
New cards

What is variable declaration?

Creating a variable for the first time. giving it a name and sometimes a data type.

12
New cards

What is constant decleration?

Creating a constant for the first time.

13
New cards

What is assignment?

giving a constant or a variable a value.

14
New cards

what is iteration?

repetition of a process e.g. a while or for loop. this could be definite or indefinite.

15
New cards

What is selection?

comparing values and then choosing an appropriate action. e.g. an if statement.

16
New cards

what is a subroutine?

A named block of code containing a set of instructions designed to perform a frequently used operation.

17
New cards

What is definite iteration?

the number of repititions is known before the loop starts.

18
New cards

What is indefinite iteration?

the number of repititions is not known before the loop starts.

19
New cards

What is a nested structure?

One structure is placed within another. Easily identified by indentation.

20
New cards

What is meant by meaningful identifier names?

Giving constants, variables and subroutines sensible and meaningful identifier names.

21
New cards

What does the real/float division operator do?

divides one number by the other.

22
New cards

What does the integer division operator do?

divides one number by the other but only returns the whole number part.

23
New cards

What does the modulo operator do?

returns the remainder of an integer division.

24
New cards

What does the exponentiation operator do?

raises one value to the power of another.

25
New cards

What does the rounding operator do?

limits the degree of accuracy of a number. (rounds up or down)

26
New cards

What does the truncation operator do?

removes the decimal part of a number. (never rounds up)

27
New cards

what does the string handling function "Length" do?

Returns the number of characters in a specified string.

28
New cards

what does the string handling function "position" do?

returns the position of a specified character within a string.

29
New cards

what does the string handling function "concatenation" do?

joins two or more strings together to form a new and longer string.

30
New cards

Is a function required to return a value?

yes

31
New cards

is a procedure required to return a value?

no

32
New cards

what can stack frames store for each subroutine?

Return addresses

33
New cards

Parameters

34
New cards

Local variables

35
New cards

what is a recursive subroutine?

a subroutine defined in terms of itself.

36
New cards

what two conditions must a recursive subroutine meet in order for the program to run correctly.

it must have a stopping condition/base case.

37
New cards

this stopping condition must be met at some point.

38
New cards

what type of error would occur if a base case in a recursive subroutine is never met.

Stack overflow error.

39
New cards

what is a data type?

a particular kind of data item, as defined by the values it can take, the programming language used, or the operations that can be performed on it.

40
New cards

why is it important to give meaningful identifier names?

It allows a different programmer to work out the purpose of a constant, variable or subroutine from its name.

41
New cards

what two things are data types defined by?

there values they can take and the operations that can be performed on them.

42
New cards

is -44 an integer?

yes

43
New cards

which data type can only be true or false?

Boolean.

44
New cards

in what type of iteration is the number of repititions required not known before the loop starts?

Indefinite iteration

45
New cards

what visible feature of program code signifies nesting?

indentation.

46
New cards

using INTEGER division what is 14 DIV 3

4

47
New cards

using the modulo operation what is 30 MOD 4?

2

48
New cards

What is 1 XOR 1?

0

49
New cards

Name two advantages of using constants over hard coded values.

Constants can be given identifier names, making the code easier to understand for humans.

50
New cards

When updating the code constants only need updating at one position in code.

51
New cards

what is a seed value used for?

generating random numbers.

52
New cards

what name is given to code run to handle an exception?

Catch block

53
New cards

What name is given to a subroutine that always returns a value?

A function.

54
New cards

what are parameters used for?

to pass data values into a subroutine.

55
New cards

What name is given to the the actual value passed by a parameter?

An argument.

56
New cards

What type of variable can be passed from any part of the program?

Global variable

57
New cards

Name 3 items stored in a stack frame.

return address

58
New cards

parameters

59
New cards

local variables

60
New cards

what is meant by a recursive subroutine.

a subroutine defined in terms of itself.

61
New cards

what is meant by a base case.

the terminating situation in recursion. it does not use recursion to produce a result.

62
New cards

what scope is a variable that can be accessed from all parts of a program?

global scope

63
New cards

list 4 types of basic structure used in the structured approach to program design and construction.

Assignment

64
New cards

sequence

65
New cards

selection

66
New cards

iteration

67
New cards

what do rectangles represent in hierarchy charts?

procedures

68
New cards

how is data stored in procedural programs?

Constants and variables.

69
New cards

what name is given to containers for data and instructions In object oriented programming?

Objects.

70
New cards

in object-oriented programming, what specifies the properties and methods that objects have?

Classes

71
New cards

in class diagrams which type of line represents aggregation?

unfilled diamond.

72
New cards

in class diagrams which type of line represents composition?

filled diamond.

73
New cards

what are data structures

containers within which information is stored by computers.

74
New cards

what three things must an array be.

Finite

75
New cards

indexed

76
New cards

only hold elements of same data type.

77
New cards

to represent a table what type of array would you use?

a 2-dimensional array.

78
New cards

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.

79
New cards

what is a queue?

an abstract data structure based on an array. A FIFO (first in first out) abstract data type.

80
New cards

an example of where queues are used in computer systems?

keyboard buffers, each key press is added to the queue.

81
New cards

which search algorithm uses a queue to keep track of which nodes have been visited?

breadth first.

82
New cards

what abstract data structure does a breadth first search algorithm use to keep track of which nodes have been visited?

A queue

83
New cards

how many pointers does a linear queue have?

2

84
New cards

where are the pointers located in a linear queue?

front and rear of the queue.

85
New cards

what operation adds a value into a queue?

enqueue

86
New cards

what operation removes a value into a queue?

dequeue

87
New cards

when a value is enqueued into a queue where is it entered?

at the rear.

88
New cards

when a value is dequeued from a queue where is it removed from?

the front.

89
New cards

what are the 4 operations that can be performed to a queue?

enqueue

90
New cards

dequeue

91
New cards

isfull

92
New cards

isempty

93
New cards

if a queue has no content what does the operation isfull return for that queue?

false

94
New cards

if a queue has no content what does the operation isempty return for that queue?

true

95
New cards

if a queue has no available positions behind the front pointer what does the operation isfull return for that queue?

true

96
New cards

if a queue has available positions behind the front pointer what does the operation isfull return for that queue?

false

97
New cards

how is emptiness detected in a queue?

if the front and rear pointer are at the same position the queue is empty.

98
New cards

what is an advantage to a circular queue?

more memory efficient.

99
New cards

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.

100
New cards

how does a priority queue work?

items are assigned a priority, items with the highest priority are dequeued first.