Component 2 Flashcards

1
Q

What are the principles of computational thinking?

A

Abstraction, decomposition and algorithmic thinking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is computational thinking

A

Taking a problem then braking it down into smaller more managable problems, solving it, then putting them back into order to solve the large problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is abstraction, decomposition and algorithmic thinking and why it is important

A

-Abstraction: The filtering of unwanted/useless information that is irrelevant to solving the problem. This allows the problem to be simplified so that the user can focus on the important and main parts
-Decomposition: The braking down of a large problem into smaller more managable ones so that the overall complicated problem becomes simplified and easier to solve
-Algorithmic thinking: Deciding on the order in which the smaller solved problems Iinstructions) should be carried out and put together. As well as identifiing the steps that the computer needs to do

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is a structure diagram

A

a form of top to bottom design that helps us to decompose a problem. Each level answers: what is invoilved in the above step

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is a flow chart and its adv and limitation?

A

A diagram that visually shows an overview of a program. It is represented by symbols that represent different types of instructions.
Advantages:
-easy to see the overview and process of the program and to see what should happen.
International standard
Disadvantages:
-with a large program, flow charts may be hard to follow and may start becomming confusing
- ay changes to the design may cause large parts of the chart to be redrawn and this is time conduming

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is pseudocode

A

it is a way/used to write algorithms in a program style construct but is not an official programming language (Meaning that there are no correct ways and no worry about syntax errors)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a trace table?

A

It is a table to show how a variable changes throughout the program as the program is run.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why is trace table useful?

A

it allows us to see weather a program is running as it should

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what are the standard searching algorithms?

A

binary, linear

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is binary search and how is it carried out?

A

Binary search is a process where the program finds the midpoint of teh data set and compares the value with the goal value. Then it proceeds to see weather it should cut off the top half or the bottom half. This repeats continuously until te goal value is found.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is a search algorithm?

A

set of instructions for finding a specific piece of data witin a data set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the limitations and advantages of binary search?

A

limit: It only works on sorted data
adv: It can be very efficient for large data sets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is linear search

A

linear search is a process where the program compares the first item in the list and compares it to the goal value if it does not match then it moves to the next one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what are the advantages and limitations of linear search?

A

adv: It works on unsorted data sets
limit: It can be time conusiming and ineffficient with large data set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is a sorting algorithm?

A

a sorting algorithm is a set of instructions to arrange a list of data into a specific order. Usually from low to high.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the types of sort algorithms?

A

merge, insertion and bubble

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

what is merge sort?

A

uses a technique called divide and conque where the list repeatedly divides into 2 from the idpoint until all elements are separated individually. They are then put back together in order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Adv and limitations of merge sort

A

Adv:
very efficient and the steps do not really increas even if the data grows
Limitations:
uses more memory
whole algorithm will run even if the data is sorted
will be quite slow for small data lists

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is insertion sort

A

it is a sorting algorithm in which it starts from the second value and compares it with the value on the right. This alows the value to be put into the correct space straight away.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Adv and limitations of insertion sort

A

Adv:
simple and little memory is used becasue the sorting is done on the original list
can quickly check weather a list is sorted
Limitation: does not cope well with large lists

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

what is bubble sort

A

it starts from the first valume in the list then compares it with the value on the right and makes the required adjustment. It does not put the value in the correct place instantly like insertion sort does. The bubble sort continues until it makes a pass without any values being swapped.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Adv and limitations of bubble sort

A

Adv:
It can be useful to check weather a list is sorted
Little memory used as only one value is sorted at a time
Limitations:
Time consuming as only one value is sorted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is each run through of a data from start to finish called?

A

Pass

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

what are variables?

A

They are named locations in memory that are used to store temporary values that can change as the program is running.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

what is the name of a variable called?

A

Identifier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

what are variables used to store

A

A single piece of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

what does declaring a variable mean?

A

stating the variables name and the type of data that it will contain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

what is assignment?

A

to assigna variable a value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What are constants?

A

basically variables but just that their assigned value does not change throughout the run of the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

why are constants used?

A

can be useful for values which do not change that you do not want tot repeatedly type into the program. This means that teh code will be much clearer and easier to edit when you want to change the value as you just need to change where you assigned the value and do not need to look through the whole program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

what is a opperator?

A

character/characters which determine what action is to be preformed

32
Q

what are the value on both side of an opperator caled?

A

opperands

33
Q

what are the 3 type of opperators used?

A

Arithmetic, boolean and comparrisson

34
Q

What are the arithmetic opperators?

A

+, -, *, /, **, // (DIV), MOD

35
Q

what is the difference between DIV and MOD?

A

DIV is basically division but it cuts of the remainder
MOD finds the first remainder of the division (like the small number you put in the short division thing)

36
Q

What are the comparrision opperators:

A

<= , ==, !=, >=, <, >

37
Q

what are the boolean opperators:

A

AND, OR, NOT

38
Q

what are always teh result to comparrisson opperators?

A

Yes/Not

39
Q

what are the 3 basic programming constructs?

A

Selection, sequence and iterationw

40
Q

what is selection?

A

construct that is used to make decisions ina. program based on conditions

41
Q

what is sequence?

A

the order in whicb each algorithm needs to be executed

42
Q

What is iteration?

A

contrcut used to repeat the sections of code needed due to a condition

43
Q

what are the 2 main types of iteration?

A

Count controlled and condition controlled

44
Q

What is count controlled iteration?

A

The block of code will repeat a lknown amount of times set by the programer.

45
Q

what is condition controlled loops?

A

=The block of code will repeat as long as the condition is true.

46
Q

what are the differences between count controlled and condition controled?

A

count controlled loops will definantlky run whereas a condition controlled loop may not even run once

47
Q

what are the 2 programming languages?

A

Low level and high level

48
Q

What type of code is machinery and assembly code?

A

low level

49
Q

what is machinery code?

A

instructions in binary that the computer can run directly without needing translation. The programmer ould need to udnerstand the inner working and hardware structure of the processor because each instruction deals wih the computers hardware

50
Q

what is a limitation of machiene code>

A

it is hardware dependent meaning that they are specific to one processor and will not run on others as the machiene code for that one would be different

51
Q

what is assembly language?

A

it is a language that has been written to replace the binary with certain mnemomics.

52
Q

what is the limitations of assembly language?

A

it has to be translated into machoene code before use

53
Q

what are the adv of low level language?

A

can be run more quickly, usually uses less RAM

54
Q

what are the advantages of high level language?

A

easy to learn and it is written faster
it also allows

55
Q

why do we need translators?

A

it allows us to convert high programming language into low level programming language.

56
Q

what are the 2 main type s of translatord?

A

Complier and interpreter

57
Q

what is a complier?

A

they produce a single executable file which can be run without the original source code. It translates all the program beforehand but at least in the future.

58
Q

what is a interpreter

A

They do not produce an executable file meaning taht every time you go to execute the proram you need a interoreter.

59
Q

what are the common tools taht ae available In the IDE (there are 4)

A

editors, error diagonosis, runtime environment and translaters

60
Q

What does IDE stand for?

A

Intergrated programming language.

61
Q

What is a editor

A

this editor is where the programmer can enter and edit their program.

62
Q

what is a error diagonosis?

A

it helps the programmer to find and fix problems which appear.

63
Q

what are run time environments

A

allows the programmer to have a quick test on their progam withpout needing to take another layer from someone else.

64
Q

what are the dfferent data types?

A

integer,boolean, float, character and string

65
Q

what are teh description of each of the variable?

A
  • integer: whole numbers
    -floats: numbers with decimals
    -boolean: either true or false
    character: a single item taht is on the keyboard
    Ruele: If we dont use it for calculation then we should store it as a string
66
Q

what are some potential drawbacks/challenges of using the IDE

A

There may be cobstant updates which could be annoying and they tend to have a lot of features which some users may find overwhelming

67
Q

Give me examples on the Third-Generation Programming Language

A

Python, Java, C++

68
Q

what is Procedural Programming:

A

Procedural programming involves writing procedures or routines.

69
Q

what is the difference between a local variable and a global varianle?

A

Localk variables :a specific type of variable that are only available within the context of a particular expression and can only be accessed within the function that defines them.
Global variables: Variables that can be accessed anywhere in the program

70
Q

how is “=” different to “==”

A

= is a assignment opperator
== is a comparrison opperatir

71
Q

how are constants and varibals similar and different?

A

Similar:
Both used to store data while the program is running
Both are given an identifier
Differences:
Constants can not change while the porgram is tun

72
Q

what is an array?

A

A static number of related data items which are stored together in the same meory space.

73
Q

What features do arrays contain?

A

-They can either be 2 or 1 dimensional
- The data within the array is acessed using a index.
- the indext usually starts at 0 for the first data ( known as zero indexted)

74
Q

what are the rules of an array?

A
  • it is fixed in size (stuff cna not be added or deleted but you can change the stuff within the array)
    -can only contain data of teh same type
75
Q

what is a list?

A

Lists are data structures similar to arrays that allow data of more than one data type to be stored.

76
Q

features of lists:

A
  • size can change
    -can contain different types of data