Pseudocode
Elements/Function
1) Selection (allows program to follow different paths with one value, we use
IF/ELSE/ELIF/nested if which is an if within an if, you still have to use indentation,
and end the IF function using EndIF)
e.g. IF Weight < 70 THEN
Print "You can continue as normal"
ELSE
ENDIF
IF Weight > 70 THEN
PRINT "You need to start exercising more"
ENDIF
CASE statements are a method of selection when answers don’t consist of values
between a particular range or there are specific values. We
use CASE/OF/OTHERWISE/ENDCASE
e.g. CASE ScoreOfGame OF
1. PRINT "You should try again"
2. PRINT "Not enough points to defeat the game"
3. PRINT "You almost won"
4. PRINT "You beat the game! But not with the highest score"
,5. PRINT "You beat the game and you achieved the highest score"
OTHERWISE
PRINT "You have no score"
ENDCASE
2) iteration (a loop)
(REPEAT/UNTIL for unknown numbers of time but must run at least once)
(FOR/TO/NEXT for limited repetitions)
, (WHILE/DO/ENDWHILE for endless loop which can run forever)
3) arrays (data structure that has only one data type because it is hard to sort the
list but can store multiple data, you can also set up the size of the array such as
[1:45])
Elements/Function
1) Selection (allows program to follow different paths with one value, we use
IF/ELSE/ELIF/nested if which is an if within an if, you still have to use indentation,
and end the IF function using EndIF)
e.g. IF Weight < 70 THEN
Print "You can continue as normal"
ELSE
ENDIF
IF Weight > 70 THEN
PRINT "You need to start exercising more"
ENDIF
CASE statements are a method of selection when answers don’t consist of values
between a particular range or there are specific values. We
use CASE/OF/OTHERWISE/ENDCASE
e.g. CASE ScoreOfGame OF
1. PRINT "You should try again"
2. PRINT "Not enough points to defeat the game"
3. PRINT "You almost won"
4. PRINT "You beat the game! But not with the highest score"
,5. PRINT "You beat the game and you achieved the highest score"
OTHERWISE
PRINT "You have no score"
ENDCASE
2) iteration (a loop)
(REPEAT/UNTIL for unknown numbers of time but must run at least once)
(FOR/TO/NEXT for limited repetitions)
, (WHILE/DO/ENDWHILE for endless loop which can run forever)
3) arrays (data structure that has only one data type because it is hard to sort the
list but can store multiple data, you can also set up the size of the array such as
[1:45])