Paper 1 Flashcards

1
Q

Explain the term algorithm

A

`An algorithm is a seirs of steps that can be folloed to complete a task.

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

Understand a computer program is…

A

an implementation of an algorithm.

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

Explain the terms:

1) Abstraction
2) Decomposition

A

1) Abstraction involves removing unnecessary details ffrom a problem in order ro solve it.
2) Decomposition involves the breaking down of a problem into smaller, simpler steps or stages.

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

Be able to solve problems using pseudocode or flowcharts

A

Give an example.

Page 6 - 12 of the Tecbook in classroom

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

Identify simple inputs, processes and outputs in algorithms

A

Input data - for example, ask the user a question or
collect a value from a sensor.

Process data - for example, add two values together or make a decision when a value reaches a certain amount.

Output data - display some results or play a sound.

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

Define the purpose of simple algorithms

A

Simple algorithms process inputted data and give an output.

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

Recognise that more than one algorithm can solve the same problem

A

Give examples

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

Compare algorithms based on their efficiency

A

Give examples

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

Explain how the linear search algorithm works

A

A linear search is when you search every single item in the list for a certain number. If you need the biggest or smallest numbers you need to search the whole list, but if you are looking for a certain number you only need to search the list until you find it.

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

Explain how the binary search algorithm works

A

A binary search is when you search for a certain number in a sorted list by halfing the list discarding the half too big or too small until you are left with the number you want to find,

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

Compare and contrast linear and binary algorithms

A

Linear searches can be performed in any list of numbers.
Binary searches can oly be performed on a sorted list.

Linear searches may work well on smaller list, but Binary searches are much quicker in big lists (most of the time)

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

Explain how the merge sort algorithm works

A

This is a two stage sort.
The first stage devides the list (by 2) forming a sublist, until each sublist is of one lenghth long.
The second stage repeatedly merges the sublist to produce a new sorted sublist until there is only one sublist remaining.Merging the final two sublists results in the sorted list.

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

Explain how the bubble sort algorithm works

A

A bubble sort works by reoeatedly going through the list to be sorted comparing each pair of adjacent elements. If the elements are in the wrong order they are swapped. This is doen in passes until the whole list is sorted but the computer must check this by compleating a final pass.

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

Compare and contrast the bubble and merge sort algorithms

A

The bubble sort algorithm is very slow and inefficient for sorting more than a very few items, wheras the merge sort is relitivly qucker.
On the other hand, the bubble sort algorithm is much simpler and easyer to understand for the coder than the merge sort algoritm.

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

Explain the concept of a data type

A

Any data that a program uses must be stored in memory locations, each given its own identifier while the program is running. Data types are diffent types of data and are catogries we sort data into.

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

List and describe the 5 common data types

A

Integer- A whole number such as: 3, 45, -453
Float/Real- A number with a fractional part such as: 34.456, -9.2, 10.4, Pi(3.14159265…)
Character- A single character, where a character can be any letter, digit, punctuation mark or symbol that can be typed.

17
Q

Describe how variable declaration is used in programs

A

In some programming languuages variables are decleared at the star of a progrtam so that when the program runs, the appropriate amount of memory can be reserved to store the data

18
Q

Describe how constant declaration is used in programs

A

In some programs, there are certain values that can remain the same while the program runs. Constants are declared at the start of a program and can then be referred to as needed in the code

19
Q

Describe how assignment is used in programs

A

In most programing languages, values are assigned to variables using an ‘=’ sign.
In pseudocode, we will use the ‘<==’ symbol to mean assignment

20
Q

Describe how iteration is used in programs

A

There are two basic iteration constructs:
For Loop- allows you to exercute a group of steps a specific number of times.
While Loop- allows you to exercute a group of steps until a specific condition is met or not met.

21
Q

Describe how subroutines are used in programs

A

A subroutine is a named, self-contained section of code that performs a specific task. It may reurn one or more valuses but doesn’t have to.

22
Q

Understand what a pixel is

A

A pixel is a single point in an image, which can have its colour set independently

23
Q

Be able to describe how pixels relate to an image

A

The more pixels you have the more detail you image has

24
Q

Be able to describe the way images are displayed

A

Images are displayed by individual pixels turning on or off, turning on with different colours makes the image colourful.

25
Q

Image file size =

A

resolution x colour depth

26
Q

Sound file size=

A

sample rate x sample size x time (s)

27
Q

what are the layers of the TCP/IP model and what do they do?

A

Application- where the user operates
Transport- establishes an end to end connection to the recipient computer. Data is then split into packets and labels it
Network- adds the destination and source IP address
Link- provides the physical link tot he network. It also adds the MAC address of the source and the next devices.