Functions
Defining Functions
We define a function using the ndondomeko
keyword. The function name is followed by the parameter list in parentheses. The function body is enclosed in curly braces.
A function can return a value using the bweza
keyword.
Calling Functions
Once a function is defined, it can be called by using the function name followed by the required arguments in parentheses.
If the function returns a value, the return value can be assigned to a variable.