Paper 2 Flashcards Preview

A Level Computer Science OCR > Paper 2 > Flashcards

Flashcards in Paper 2 Deck (281)
Loading flashcards...
1

variable

named locations that store data in which the contents can be changed during program execution

2

local variable

declared inside a function. They can only be accessed and used in that function.

3

global variable

declared outside of all the functions, they can be used throughout the whole program including inside functions.

4

advantages of functions

easier to create and test

5

subprogram

self-contained units of code that perform some well-defined purpose.

6

function

a subprogram that ALWAYS returns a single value

7

procedure

a subprogram that returns one or many values.

8

parameter

the data that is supplied to a subprogram so that they can be reused

9

passing by reference

the address of the variable is passed to the subprogram.
if the variable is changed it stays changed.

10

passing by value

a copy of the variable is passed to the subprogram. The original variable is unchanged no matter what the subprogram does.

11

binary search precondition

the list needs to be sorted

12

Insertion sort

works by dividing a list into two groups: sorted and unsorted. Elements are inserted one by one into their correct position in the sorted section.

13

thinking abstactly

represents reality by recognising what is important and blocking out other details

14

thinking ahead

planning input and outputs e.g. caching

15

caching

a temporary store where data and instructions or data that are likely to be needed are stored.

16

Thinking procedurally

writing in modules to split a problem up into manageable tasks

17

Thinking Logically

inferring things from what you already know and understanding where decisions need to be made and their consequences

18

Thinking concurrently

thinking about how a job might be done better if some parts were performed at the same time.

19

features of an IDE

1. Auto-complete
2. colour coding/ syntax highlighting
3. stepping
4. breakpoints
5. watch window
6. error diagnostics

20

features of an IDE: Auto-complete

recognises identifiers

21

features of an IDE: colouring syntax

identifies different features making the code easier and quicker to check

22

features of an IDE: stepping

runs one line at a time to check the result, good for error checking

23

features of an IDE: breakpoints

stops the code at set points to check the value of variables, good for error checking

24

features of an IDE: watch window

tracks how variables change during the execution

25

features of an IDE: error diagnostics

locates and reports errors

26

IDE

Integrated Development Environment

27

What is an IDE

contains all the tools needed to write, develop and debug and program

28

IDE three main tools

1. editor
2. build facility (automates the process of constructing a program from its component parts)
3. a debugger

29

Three programming constructs

sequence
selection
iteration

30

sequence

a series of statements that are executed one after the other