3.1 Algorithms Flashcards
What is an algorithm?
A set of instructions to complete a task
What is decomposition?
Breaking down problems into sub problems until each sub problem can be solved separately
What is Pseudocode and its benefits?
-Pseudocode is a way of writing code in plain English
-Pseudocode can be translated into all other coding languages
-It can be easy to understand
What are terminators in a flowchart and what shape is it?
-A start or end
-It is oval shaped
What is an input/output in flowchart and what shape is it?
-Where a flowchart is inputting information or outputting it back to the user
-It is a parallelogram shape
-writeline and readline in VB
-OUTPUT and USERINPUT in Pseudocode
Which shape represents a process happening in a flowchart?
Rectangle
What is:
IF THEN…
…ELSE
-Form of selection
-If a certain condition is met, this code will run otherwise it will not
-logical test
What is:
WHILE…
…ENDWHILE
-Indefinite iteration
-Code is repeated until a condition is met
-Checks the condition before the code inside is executed
What is:
REPEAT…
…UNTIL
-Indefinite iteration
-Code is repeated until a condition is met
-Checks the condition after the code inside is executed
What is:
FOR…
…ENDFOR
-Definite Iteration
-Repeats the code a set number of times
What is USERINPUT?
What the user types in
What is OUTPUT?
What the computer displays onto the screen
What does this symbol mean?
+
Addition
What does this symbol mean? -
Subtration
What does this symbol mean?
*
Multiplication
What does this symbol mean?
/
Division
What does this symbol mean? ^
-Carrot
-Used for indices
What is DIV?
-Division which only returns the integer
- 9 DIV 2 = 8
- \ in VB