Presentation is loading. Please wait.

Presentation is loading. Please wait.

Why use functions? General programming advantages Clearly defined computations Enables code reuse Easier to debug 1.

Similar presentations


Presentation on theme: "Why use functions? General programming advantages Clearly defined computations Enables code reuse Easier to debug 1."— Presentation transcript:

1 Why use functions? General programming advantages Clearly defined computations Enables code reuse Easier to debug 1

2 How can we realize functions in BYOB? A function requires: A “call” -> Messages Input variables -> Define input variables Output variable -> Define output variable Let’s implement: DrawSquare() Animate() SayHello(Name) 2

3 Classwork Create a command block for: Pen Category: Draw Square(length) Motion Category: Jump(height) Looks Category: ChangeMood(mood) Create a costume and a saying for at least 3 moods

4 Homework Complete in Classwork to hand in for grading Create a block that draws N number of nested squares DrawNestedSquare(number) When number = 3, the drawing looks like:


Download ppt "Why use functions? General programming advantages Clearly defined computations Enables code reuse Easier to debug 1."

Similar presentations


Ads by Google