IST - Software Development Control Structures Flashcards
What are the 2 types of loop
Pre-test loop
Post-test loop
Show a Pre-test loop
WHILE test condition is TRUE
do process
END WHILE
Show a Post-Test Loop
statement before loop REPEAT process statements UNTIL condition is TRUE statement after loop
What are the 7 datatypes
Character Data- Holds one character eg. H - as
String Data- Holds multiple characters eg. bird
Integer Data- Holds whole numbers- as int
Real numbers- Holds decimals- As double, As single
Boolean- True/False
Date and Time- Holds dates and time
Binary Data- holds large data such as movies
What form do you write an algorithm
Pseudo code or Flowchart
What are the 3 types of control structure
Sequence- one event after the other
Selection- casewhere - binary selection
Repetition- Post test loop - pre test loop
Show a pseudo code example of a sequence control structure
BEGIN
process 1
process 2
END
Show a pseudo code example of a binary selection control structure
IF = True THEN do process 1 ELSE do process 2 END IF
Show a pseudo code example of a casewhere control structure
CASEWHERE
choice 1: process 1
choice 2: process 2
otherwise: Default process
ENDCASE