Download presentation
Presentation is loading. Please wait.
Published byJune Boone Modified over 8 years ago
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:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.