Page 47 - Touchcode_C8_Flipbook
P. 47
Step 3: Modify the ‘on start’ block as shown below:
Well done, you have learnt to implement return function.
Coding uiz 03 Critical Thinking
Give one word answer to the following questions.
a. What is the main purpose of using functions? .......................
b. What does function returns when an operation is performed inside
a function? .......................
Coding fact
Carol Shaw is one of the first female game designers and programmers in the
video game industry known for creating 3-D Tic-Tac-Toe game.
At a Glance
A function is a set of steps that result in a single specific action.
Function parameters are the names listed in the function definition and Function arguments
are the real values passed to (and received by) the function.
The main purpose of using functions is to get rid of the repetitive block of code.
When an operation is performed inside a function it gives back a value, which can be used
later in the program to get the results, which makes a function more useful.
Functions in Depth 45

