ICT KS3 Year 7
Logo interpreter: Turtle graphics – Part 2
Lesson 3:
The building blocks of programs
Subroutine
Subroutine
– performs a particular
task and is given a name.
The word
“procedure” sometimes being used in place of the word “subroutine”. Subroutine
and procedure mean the same thing.
For
example, a subroutine to draw a square, could be called SQUARE.
Sometimes,
the subroutine is used more than once in the same program, so you can simply
type in the name of the subroutine rather than type in all the instruction
again.
Example:
https://youtu.be/ry7y-7D7Oa4
No comments:
Post a Comment