2.1.2-Designing, Creating and Refining Algorithms

0.0(0)
studied byStudied by 2 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/30

flashcard set

Earn XP

Description and Tags

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

31 Terms

1
New cards
Input
The data entered by a program, either by a user or the processor itself.
2
New cards
process
The steps that a program uses to carry out a specific task.
3
New cards
output
The data that is displayed to the user after certain steps of a program have been completed.
4
New cards
structure diagram
A diagram that shows tasks that have been broken down into subtasks in order to make it easier to solve
5
New cards
Algorithm
A specific set of instructions a computer can follow in order to make a problem easier to solve
6
New cards
Flowchart
a visual representation of an algorithm that clearly shows input, processes and outputs
7
New cards
Sub-problem
a smaller problem that is part of a larger problem
8
New cards
Pseudocode
A universal programming language that is a mix of English and programming languages.
9
New cards
Variable
A container in an algorithm that can change without the actual code being changed
10
New cards
Constant
A container in an algorithm that doesn't change unless the code is altered.
11
New cards
sequence
the order in which the tasks are followed in an algortihm
12
New cards
Selection
A decision in the program, where different conditions result in different tasks being carried out.
13
New cards
Iteration
When tasks in a program are repeated
14
New cards
Syntax Error
An error in the language of the program. The computer cannot perform the program if there are syntax errors.
15
New cards
Logic error
An error in the logic of the program. The computer will still carry out the tasks, but they will not be the intended tasks.
16
New cards
Trace Table
A table that allows you to go through each step of an algorithm to ensure there are no logic errors and the program is running as desired.
17
New cards
start (flowchart)
rectangle with curved edges
18
New cards
input/output (flowchart)
parallelogram
19
New cards
process (flowchart)
rectangle
20
New cards
decision (flowchart)
diamond
21
New cards
subprocess (flowchart)
rectangle with lines along two edges
22
New cards
and/or/not
capitalised
23
New cards
all text should be...
lowercase
24
New cards
how many statements per line?
1
25
New cards
what should the variable names be?
meaningful
26
New cards
example of logic error
-incorrect comparison operator
-incorrect arithmetic operator
27
New cards
example of syntax error
-missing parenthesis
-misspelled words
28
New cards
pseudocode FOR loop
for x\= 1 to 10
print (x)
next x
29
New cards
pseudocode WHILE loop (definite)
x\=0
while x
30
New cards
pseudocode WHILE loop (indefinite)
num1\=10
num2\=input("enter your guess: ")
while num2 !\= num1 then
print ("incorrect")
num2\=input("enter your guess: ")
endwhile
else
print ("correct")
31
New cards
pseudocode DO UNTIL loop
num1\=10
num2\=input("enter your guess: ")
do:
print ("incorrect")
num2\=input("enter your guess: ")
until
num1\=num2