8525 Unit 1 Flashcards

1
Q

Algorithm definition

A

An algorithm is a set of instructions for solving a problem or completing a task

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

Abstraction definition

A

Involves removing unnecessary detail from a problem so that you can focus on the essential components

E.g. London Underground

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

Decomposition definition

A

Involves breaking down a large problem into smaller sub-problems

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

Decomposition advantages

A

Problem becomes easier to solve
Some modules may be reusable in other programs, saving development time
Can collaborate

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

Computational thinking

A

The use of computers to solve problems

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

Start/end flowchart symbol

A

Rounded rectangle looking thing
__________
(__________)

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

Input/output flowchart symbol

A

Parallelogram

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

Sub-process flowchart symbol

A

_____________
|__|_____|__|

Rectangle with two lines in the middle

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

Process flowchart symbol

A

Rectangle

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

Decision flowchart symbol

A

Rhombus with one arrow coming out on the right and one arrow going down
Labelled true/yes and false/no

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

What is a flowchart

A

A diagram that shows the inputs, outputs and processes in an algorithm

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

All programs are composed of three basic structures:

A

Sequence
Selection
Iteration

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

What is a sequence

A

A series of steps which are completed one after another

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

What is selection

A

Selection is the ability to choose difference paths through a program

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

What is iteration

A

Means repeating a part of a program
Referred to as repetition or looping

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

Data types

A

Integer—whole number—1475,0,-5

Real—number with a decimal point—56.75, 6.0, -2.5, 0.0

Character—a single alphabetic/numeric/symbol character

String—one or more characters enclosed in quote marks

17
Q

Iteration statements

A

FOR…ENDFOR

WHILE…ENDWHILE

REPEAT…UNTIL

18
Q

Write a search algorithm for numbers <- [5,1,9,8,7,6,4,10]
In linear search

A

numbers <- [5,1,9,8,7,6,4,10]
searchItem <- STRING_TO_INT(USERINPUT)
FOR i <- 0 TO LEN(numbers) - 1
IF numbers[i] = searchItem THEN
OUTPUT “searchItem found”
ENDIF
ENDFOR