Paper 2 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is an algorithm?

A

An algorithm can be described as “A set of steps that show how to perform a task or reach a goal”.

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

What is Binary search?

A

Binary search is an efficient algorithm for finding an item from a sorted list of items.

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

How does Binary search work?

A

It works by repeatedly dividing in half the portion of the list that could contain the item, until you’ve narrowed down the possible locations to just one.

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

What is linear search?

A

A linear search is the simplest method of searching a data set. Starting at the beginning of the data set, each item of data is examined until a match is made. Once the item is found, the search ends. If there is no match, the algorithm must deal with this.

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

What are the types of translators in computer?

A

Compiler

Interpreter

Assembler

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

What is the compiler?

A

A compiler translates a high-level language into machine code

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

What is the interpreter?

A

An interpreter is another type of program that translates a high-level language into machine code

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

What is the assembler?

A

An assembler translates assembly language into machine code. Assembly language is a low-level language written in mnemonics that closely reflects the operations of the CPU .

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

What are 2D arrays?

A

A two-dimensional array is similar to a one-dimensional array, but it can be visualised as a grid (or table) with rows and columns. Positions in a two dimensional array are referenced like a map using horizontal and vertical reference numbers. They are sometimes called matrices.

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

Examples of High-level Programming languages:

A

Python, Visual Basic, C#, Java, C++, PHP, Delphi, Logo

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

Examples of Query languages:

A

SQL

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

Examples of Markup languages:

A

HTML, XML

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

Examples of Low-level Programming languages:

A

Assembly language

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

What does Assembly language do?

A

Assembly language allows a programmer to create programs more easily than writing in machine code

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

What does Assembly language have to do?

A

Translate into machine code before can be executed

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

Describe High-level languages

A

High level languages generally have statements that look a bit like English or Maths

This makes these languages easier to learn and understand

17
Q

What have many high-level languages been designed to do?

A

To make it as easy as possible to write programs to solve certain types of problems

18
Q

Advantages of High-level languages:

A

A high-level language is easier to learn

Programs can be written faster on a high-level language

It is easier to understand and debug a high-level language

19
Q

Advantages of Low-level languages:

A

A program written in a low-level language can run very quickly

The code will usually require less RAM

Statements in a low-level language can be used to control and manipulate specific hardware components

20
Q

What is source code?

A

The code written by the programmer

21
Q

What is object code?

A

The code produced by the compiler

22
Q

What are the differences between compiler and interpreter?

A

Compiler translates the whole program to produce object code, Interpreter translates and executes one line at a time

A compiled program executes faster as it is already inmacbine code, Interpreter take more time to execute as each instruction is translates before it is executed

23
Q

What are the three Boolean Functions?

A

AND

OR

NOT

24
Q

What is a syntax error?

A

A syntax error is one where the code written doesn’t conform to the rules of the language

25
Q

What is a logical error?

A

The remaining error is a logical error

26
Q

Why is it important that programs are fully tested?

A

To find any logical errors

27
Q

What types of data is in the data plan?

A

Normal data

Boundary data

Invalid data

Erroneous data

28
Q

What is a trace table useful for?

A

A trace table is useful for tracing through a program in order to find a logic error

Determining the purpose of an algorithm

Finding the output of an algorithm

Finding errors in an algorithm

29
Q

What are the two types of testing?

A

Iterative testing - tests modules and parts of a program as the program is developed

Final testing - tests the whole program at the end of production

30
Q

What are IDE’s?

A

Integrated Development Environments

31
Q

What features do IDE’s provide?

A

Line numbers

Breakpoints

Code folding

Variable watching

32
Q

What do line numbers do?

A

Lune numbers allow a programmer to clearly see every new line of code.

33
Q

What is Syntax highlighting?

A

Syntax highlighting is where the colour of the text changes to show different parts of the program

34
Q

What do Error diagnostics do?

A

Error diagnostics help a programmer to find where they have made a mistake

35
Q

What do Breakpoints do?

A

Breakpoints are set by the programmer so that the IDE stops the program mid-way through running

36
Q

What is the difference between function and procedure?

A

A procedure is a block of code that is called to perform a task. A function is a block of code that is called to perform a task and will return one or more values.

37
Q

What is Bubble sort?

A

Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted.

38
Q

What is Merge sort?

A

In computer science, merge sort is an efficient, general-purpose, and comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the order of equal elements is the same in the input and output.

39
Q

What is Insertion sort?

A

Insertion sort is a simple sorting algorithm that builds the final sorted array one item at a time. It is much less efficient on large lists than more advanced algorithms such as quicksort, heapsort, or merge sort.