scratch programming-function(1)-
2020-08-13 本文已影响0人
思求彼得赵
2020-08-11
function is a very important concept in programming.
even in an object-oriented programming language, we still can find that function exists in the CLASS or OBJECT which is called method or sometimes function.
in Scratch, the function is not difficult to understand and can be easy to use.
you can find there is a My Blocks group. and please open the Make a Block.
my blocksyou can name your new block. and setup other parameters. but now , let's just name it.
image.png
as a first example. I made two blocks:
turnRight make the role turn right and draw a circle. and the turnLeft block makes the role turn left and draw a circle.
now we use our own blocks to program.
image.png
let's try it.
https://scratch.mit.edu/projects/417069758