Computational Thinking and Programming Concepts

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

1/70

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.

71 Terms

1
New cards

Decomposition

Breaking down a complex problem into smaller, more manageable sub-problems.

2
New cards

Abstraction

Focusing on the essential details of a problem/system while hiding unnecessary complexities.

3
New cards

Benefit of subprograms

Improves code organisation, makes code reusable, and is easier to debug.

4
New cards

Basic programming constructs

Sequence, Selection, Repetition (Iteration).

5
New cards

Count-controlled loop structure

FOR loop (e.g., FOR i = 1 TO 10 DO...NEXT i).

6
New cards

Condition-controlled loop structure

WHILE loop (e.g., WHILE score < 100 DO...END WHILE) or REPEAT UNTIL loop (e.g., REPEAT...UNTIL score >= 100).

7
New cards

Variable in an algorithm

A named storage location in memory whose value can change during program execution.

8
New cards

Constant in an algorithm

A named storage location in memory whose value does not change during program execution.

9
New cards

Array

An ordered collection of elements of the same data type, accessed via an index.

10
New cards

String

A sequence of characters (e.g., 'Hello World').

11
New cards

Arithmetic operators

+ (addition), - (subtraction), * (multiplication), / (division), MOD (modulus - remainder of division), DIV (integer division - whole number result), ^ (exponentiation - to the power of).

12
New cards

Relational operators

= (equal to), != or <> (not equal to), < (less than), > (greater than), <= (less than or equal to), >= (greater than or equal to).

13
New cards

Trace table

To manually track the values of variables and outputs in an algorithm step-by-step to check its logic.

14
New cards

Syntax error

Violates the grammatical rules of the programming language (the program won't run).

15
New cards

Logic error

The program runs, but produces incorrect or unexpected results due to flaws in the algorithm's design.

16
New cards

Runtime error

An error that occurs while the program is executing, causing it to crash (e.g., division by zero, trying to access a file that doesn't exist).

17
New cards

Bubble sort

Repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order, until the list is sorted.

18
New cards

Merge sort

Divides the list into sublists until each contains one element, then repeatedly merges these sublists to produce new sorted sublists.

19
New cards

Linear search

Checks each element in a list sequentially from the beginning until the target item is found or the end of the list is reached.

20
New cards

Binary search

An efficient search for sorted lists; it repeatedly divides the search interval in half until the target is found or the interval becomes empty.

21
New cards

Why do computers use binary?

(Definition not provided in the notes.)

22
New cards

Electronic circuits

Represent two states: on/off, high/low voltage, which maps directly to 1s and 0s.

23
New cards

3 bits

Can represent 2^3=8 states.

24
New cards

Unsigned integer

A positive whole number, including zero.

25
New cards

Two's complement

Used for representing negative integers in binary.

26
New cards

Denary to 8-bit binary conversion

Denary 10 is represented as 00001010.

27
New cards

Binary to denary conversion

Binary 11001011 converts to denary as 128+64+0+0+8+0+2+1=203.

28
New cards

Overflow error

Occurs when the result of a binary calculation is too large to be stored in the allocated number of bits.

29
New cards

Hexadecimal

Used in computing as a more human-readable way to represent long binary numbers, where each hex digit represents 4 binary bits.

30
New cards

Character encoding in binary

Using character sets like ASCII (7-bit) or Unicode.

31
New cards

Bitmap images representation

Represented as a grid of pixels, where each pixel's colour is represented by a binary code.

32
New cards

Analogue sound to binary conversion

By sampling (taking measurements of the amplitude at regular intervals).

33
New cards

Sample rate and sound quality

A higher sample rate means more samples per second, leading to a more accurate digital representation of the original sound, thus higher quality.

34
New cards

Data storage units

From smallest to largest: bit, nibble, byte, kibibyte (KiB), mebibyte (MiB), gibibyte (GiB), tebibyte (TiB).

35
New cards

Data compression types

Lossless compression: Data can be fully restored to its original state. Lossy compression: Some data is permanently removed, resulting in a smaller file size but a loss of quality.

36
New cards

Lossless compression example

Run-Length Encoding (RLE), TIFF, PNG, ZIP.

37
New cards

Lossy compression example

JPEG (images), MP3 (audio), MP4 (video).

38
New cards

Environmental impacts of computing

Energy consumption: From manufacturing, using, and cooling hardware. E-waste: Disposal of old electronic devices containing hazardous materials.

39
New cards

Intellectual property

Creations of the mind, such as inventions, literary and artistic works, designs, symbols, names, and images, used in commerce, protected by law (e.g., copyright, patents).

40
New cards

Data protection legislation purpose

To protect individuals' personal data and ensure it's processed lawfully, fairly, and transparently.

41
New cards

Computer Misuse Act

Primarily designed to prevent unauthorised access to computer material (hacking), unauthorised access with intent to commit further offences, and unauthorised modification of computer material.

42
New cards

Ethical concern regarding AI

Potential for job displacement, algorithmic bias, lack of transparency in decision-making, privacy concerns.

43
New cards

Malware

Malicious software designed to damage or gain unauthorised access to computer systems. Examples: Viruses, worms, ransomware, spyware.

44
New cards

Viruses

Malicious software that replicates itself and spreads to other computers.

45
New cards

Worms

A type of malware that replicates itself to spread to other computers.

46
New cards

Ransomware

Malicious software that encrypts files and demands payment for decryption.

47
New cards

Spyware

Software that secretly monitors user activity and collects personal information.

48
New cards

Social engineering

Manipulating people into performing actions or divulging confidential information.

49
New cards

Phishing

A method of social engineering that uses fake emails to trick users into providing sensitive information.

50
New cards

Denial of Service (DoS) attack

Flooding a system or network with excessive traffic, making it unavailable to legitimate users.

51
New cards

Authentication

Verifying user identity (e.g., strong passwords, 2FA, biometrics).

52
New cards

Encryption

Scrambling data to make it unreadable without a key.

53
New cards

Firewalls

Blocking unauthorized network access.

54
New cards

Anti-malware software

Detecting and removing malicious software.

55
New cards

Penetration testing

A simulated cyberattack against a computer system or network to find security vulnerabilities.

56
New cards

Decomposition in programming

Breaking a large problem into smaller, manageable sub-problems, making it easier to design and implement.

57
New cards

Maintainable code techniques

Using comments to explain code and using meaningful variable names.

58
New cards

Fit for purpose

A program that meets all the requirements and specifications for which it was designed.

59
New cards

Selection construct example

IF score >= 50 THEN PRINT 'Pass' ELSE PRINT 'Fail' END IF.

60
New cards

Initialisation of a variable

Giving a variable its first value, often at the start of a program or before a loop.

61
New cards

Primitive data types

Common types include Integer (whole numbers), Real/Float (numbers with decimal points), Boolean (True or False), and Char (a single character).

62
New cards

Record data structure

A collection of related data items, which can be of different data types, grouped together under a single name.

63
New cards

Length of a string

Obtained using a built-in function (e.g., LEN(myString) or len(myString) depending on the language).

64
New cards

String concatenation

Joining two or more strings together to form a single string (e.g., 'Hello' + 'World' = 'HelloWorld').

65
New cards

Input statement purpose

To allow the program to receive data from the user (e.g., via keyboard).

66
New cards

CSV files

Commonly used for storing tabular data where values are separated by commas.

67
New cards

Procedure

A subprogram that performs a task but does not return a value.

68
New cards

Function

A subprogram that performs a task and returns a value.

69
New cards

Parameter in a subprogram

A value passed into a subprogram from the main program or another subprogram to be used during its execution.

70
New cards

Local variable

Only accessible within the subprogram or block where it is defined.

71
New cards

Global variable

Accessible from anywhere in the program.