Programming Fundamentals: Programming fundamentals: Computer Science: GCSE (9:1)

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/21

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

22 Terms

1
New cards

Sequence

A code construct where instructions follow, one after the other

<p>A code construct where instructions follow, one after the other</p>
2
New cards

Selection

A code construct where the code makes a decision, and takes one of several branches. An example is shown here in OCR Exam Reference Language (ERL).

<p>A code construct where the code makes a decision, and takes one of several branches. An example is shown here in OCR Exam Reference Language (ERL).</p>
3
New cards

Iteration

A code construct where the instructions repeat. Can be count-controlled or condition-controlled. An example is shown here in OCR Exam Reference Language (ERL).

<p>A code construct where the instructions repeat. Can be count-controlled or condition-controlled. An example is shown here in OCR Exam Reference Language (ERL).</p>
4
New cards

Code construct

A building block of code, they are sequence, selection and iteration

5
New cards

Count-controlled

The type of iteration that repeats instructions a set number of times, using a count. Uses a for loop in most high-level languages

6
New cards

Condition-controlled

The type of iteration that repeats instructions a until a condition is met. Uses while or repeat in high-level languages

7
New cards

Subprogram

A small set of instructions that completes a specific task, sometimes called a subroutine. It can be a function or procedure. The image is the flowchart shape for it

<p>A small set of instructions that completes a specific task, sometimes called a subroutine. It can be a function or procedure. The image is the flowchart shape for it</p>
8
New cards

Procedure

A subprogram which does not return a value. For example it might redraw the screen or write a record to a file

9
New cards

Function

A subprogram which returns a value. It might return a random dice roll, calculate a ticket price or determine your exam grade

10
New cards

Structured code

Code that is written in a systematic way, in reasonable code blocks and using subprograms. Makes code easier to maintain

11
New cards

Random

Describes an arbitrary number generated by a high-level language, useful in games and simulation programs

12
New cards

Variable

A named memory location holding a single value that can change during the program, e.g. name, age, x, y

13
New cards

Constant

It cannot change, this is a named memory location for something that stays the same. Examples are PI, Number_of_Levels, MAXHEALTH

14
New cards

Operator

Any symbol or keyword that performs a calculation on its values, they can be arithmetic, comparison or boolean

15
New cards

Arithmetic operator

A symbol used in an expression to perform arithmetic calculations, these are + - * / DIV MOD and ^

16
New cards

Comparison operator

A symbol used to compare two values in an expression, they are == != < <= > >=

17
New cards

Boolean operator

A keyword that carries out a logic operation, it can be AND, OR or NOT

18
New cards

Input

Any data that is received into a program while it is running

19
New cards

Output

Information that is produced by a program and made available for us to see or hear

20
New cards

Expression

A phrase made up of at least one operation plus literals, constants or variables, it can be evaluated and produce a result. Valid examples are

total / 7

age >= 18

time < 8 AND band=="Senior"

21
New cards

Literal

An actual value coded into the program, not a variable or constant. Examples in bold are:

MaxLives = 10

Level = "Haunted Castle"

if health < 5 then

22
New cards

Assignment

A statement that assigns a value to a variable. The right side of the equals sign can be any expression. These are valid:

health = 100

fare = 5 + 0.5 * miles

discount = time < 8 AND band=="Senior"