2.1 + 2.2.1 Computational thinking + programming A Level OCR Computer Science

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:20 PM on 6/12/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

20 Terms

1
New cards

What is abstraction

The process of removing unnecessary details from a problem when creating a solution to focus on the most important features of the problem. It simplifies the problem by reducing its complexity

2
New cards

Why is abstraction needed for a programmer

It makes it easier to design, read and maintain code, speeding up the development time of a solution and improving system maintenance. It also saves memory and processor time when a program is being run since the removal of non-essential details decreases the amount of computer time and resources the program uses.

3
New cards

Why is abstraction needed for a user

A program is more likely to suit a user’s needs by focusing more on the important features of the problem. Complex details are hidden from the user, allowing them to interact with and use a solution without needing to understand how it works. Smaller programs that require less resources are more accessible to users with lower-spec devices.

4
New cards

What is program decomposition

The process of splitting a problem into a series of smaller, more manageable sub-problems that can be more easily tackled/solved.

5
New cards

Why is decomposition needed (for a programmer)

Breaking down a problem into individual components allows programmers to identify any program functions/modules that are reusable and any that can be worked on concurrently. The development of individual modules can be split up between programmers, and each can be tested in isolation, making debugging easier.

6
New cards

What is a precondition

A statement/condition that must be true before an algorithm or subroutine can be called and executed. This prevent errors or crashes from occuring if this algorithm is used with values it cannot process.

7
New cards

What is a variable

A named storage location in memory that holds a value and that value can be changed.

8
New cards

What is casting

The process of converting a piece of data in one data type to another data type.

9
New cards

What is selection

When a program makes a decision based on the evaluation of a Boolean expression/condition, which determines which block of code, algorithm or subroutine is run next.

10
New cards

What is sequence

The execution of instructions one line after another in a specific, sequential, chronological order.

11
New cards

What is iteration

The repeated execution of a specific few lines of/block of code using a loop. This can be count-controlled (executing a set number of times) or condition-controlled (executing until a specific condition is met).

12
New cards

What is a subroutine

A self-contained, standalone block of code within a larger program that performs a specific task. It is given a specific, unique name so that it can be called multiple times from different places within the program, allowing code reusability.

13
New cards

What is problem recognition

The process of identifying that a problem exists, analysing and understanding its true nature, and determining whether it can be solved using computation methods.

14
New cards

What are the features of a recursive algorithm

The algorithm must call itself. Each recursive call of this algorithm creates a new copy of the values being used in the subroutine, which are added to a stack of subroutine calls. There must be a base case that stops the algorithm calling itself after a finite number of calls.

15
New cards

What is a global variable

A variable declared in the main body of a program, outside of any subroutines, that can be accessed and modified from anywhere within the program, and remains in memory from its declaration to when the program terminates.

16
New cards

What is a local variable

A variable declared inside a specific algorithm or subroutine, that is only accessible within that subroutine and only exists while the subroutine is running (is destroyed when it terminates).

17
New cards

What are the advantages and disadvantages of global variables

They can be read and edited by any part of the program, making them easily accessible but easy to accidentally modify or overwrite. They remain in memory for the duration of the program’s execution, improving data persistence but increasing memory usage of the program. They make programs harder to test and maintain.

18
New cards

What are the advantages and disadvantages of local variables

They can only be accessed and updated within their subroutine, preventing unintended modifications but also making them harder to use since they need to be passed as parameters. They are stored in memory only during the execution of the program, making them more memory efficient but their data less persistent. They make programs easier to test and maintain.

19
New cards

What is passing a parameter by value

A copy of the data to be used is passed into a subroutine, so that changes made to the parameter inside the subroutine do not affect the data in the original variable.

20
New cards

What is passing a parameter by reference

A pointer to the memory address of the original variable is passed into the subroutine, so that changes made to the parameter inside the subroutine directly and permanently alter the data in the original variable.