Topic 1 : Computational Thinking

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

1/31

encourage image

There's no tags or description

Looks like no tags are added yet.

32 Terms

1
New cards

Algorithm

A precise method for solving a problem

2
New cards

Decomposition

Breaking down a problem into smaller, more manageable sub programs which then make it easier to solve.

3
New cards

Benefits of decomposition

1. Reduces complexity

2. Different sub programs can be worked on simultaneously

3. Each sub program can be isolated and tested individually

4. Sub programs often lead to the creation of independent, reusable codes

4
New cards

Examples of decomposition irl

Video game design:

Decomposed into individual layers (character mechanics, world landscape design, sound engineering etc)

5
New cards

Abstraction

The process of removing or hiding unnecessary information so only the important details remain.

6
New cards

Benefits of abstraction

1. Reduces complexity

2. Prevents information overload

3. Saves time and resources

7
New cards

Examples of abstraction irl

London Underground map:

Only shows what a commuter needs, and omits unnecessary details

8
New cards

Flow chart

A graphical representation of an algorithm

9
New cards

Flow Chart Symbols

10
New cards

DIV (//)

Quotient ( only returns whole number)

11
New cards

MOD (%)

Modulo/Modulus ( Only returns remainder)

12
New cards

**/^

exponentiation ( To the power of)

13
New cards

Variable

A named location in computer memory that stores a value that can change

14
New cards

Constant

A named location in computer memory that stores a value that cannot change

15
New cards

Syntax error

An error that breaks the grammatical rules of a programming language and stops it from running

16
New cards

Examples

1. Typos and spelling errors

2. Incorrect use of operators

3. Invalid variable or function names

17
New cards

Logic error

Incorrect correct code is used. Program still runs but produces incorrect output as a result

18
New cards

Examples

1. Infinite loops

2. Incorrect use of operators

3. Using variables before they are assigned

19
New cards

Runtime error

An error that causes the program to crash

20
New cards

Examples

1. Dividing a number by 0

2. Index out of range of an array

3. Unable to read or write a drive

21
New cards

Relational Operators

1. Equal to

2. Not equal to

3. Less than

4. Less than I'd equal to

5. Greater than

6. Greater than or equal to

22
New cards

Equal to

==

23
New cards

Not equal to

!=

24
New cards

Less than

<

25
New cards

Less than or equal to

26
New cards

Greater than

>

27
New cards

Greater than or equal to

>=

28
New cards

Logical operators

1. And

2. Or

3. Not

( logical operators are always used alongside relational operators to form a comparison)

29
New cards

Not Gate

Input is always opposite to output

Eg: Input (A)

Output (Not A)

30
New cards

And Gate

Both Inputs have to be on in order for output to be in

Eg: Input (1,1) Input (0,1)

Output (1) Output (0)

31
New cards

Or gate

Only one input must be on for output to be on

Eg: Input (0,0) Input (0,1)

Output (0) Output (1)

32
New cards

Truth Table Structure

Input columns/Output columns