Pseudo Codes
Pseudo Codes
~ITERATION :
1- FOR counter _ TO _
OUTPUT “ @ “
NEXT counter
2- Counter<- 0
REPEAT
OUTPUT “ @ “
Counter<- Counter+1
UNTIL this condition is true
3- Counter <- 0
WHILE condition is true DO
OUTPUT “ @ “
Counter <- Counter+1
ENDWHILE
~TOTALLING :
Total <- 0
Total = Total + Count
~COUNTING:
Counter <- 0
FOR Counter _ TO _
…..
Counter = Counter + 1
~AVERAGE :
Average <- Total/ Count
~LINEAR SEARCH :
searches linearly along a counter for a true statement until it is found.
~BUBBLE SORT :
sorts the counters in ascending or descending orders e.g. temperatures.
~OPERATORS :
mathematical,
Boolean(AND, OR , NOT) ,
logical ( comparisons )
-Syntax:
PROCEDURE name
(the code e.g OUTPUT “ @ “ )
ENDPROCEDURE
~FUNCTIONS : are used for the same purpose but returns a value back to the
caller of the function .
In a way, it's like the function is giving a gift back to the code that called
it.
basically it stores the value of the result that u get after the function is
performed and u can call it again.
It's like the function's way of saying, "Here's what I've done for you!" 🌟🤖
RETURN(parameter : datatype )
ENDFUNCTION