Functions in CodeCraft
- to build a block
- to build a column
You've already seen the power of for loop
in CodeCraft world, you will be amazed after you get to know functions
.
We'll develop two fundamental functions in CodeCraft:
block_m(x, y, z, m)
and column_m(x, z, h, m)
.
We'll use these two functions a lot later in this book:
to demo the application of Python basic knowledge;
to construct complicated structures with the Python basics;
to learn about advanced topics such as time delay, recursion, class/object, events/callback functions...