Is there a way for students to create a Function in App Lab so that if they have similar code that is repeated throughout the app they can simply call on that code instead of creating multiple instances of the same code over and over?
Hello @a.tyler,
Yes, there is a function block that can be used that way if I understand your question correctly. I know you posted this in the CS Discoveries section of the forum. Is this for a particular CS Discoveries lesson or just in general?
This link will take you to the lesson on functions in the CS Principles course. If your students are pretty good at grasping some more advanced topics, you could refer them to these lessons as App Lab is used in both courses. Also, if you hover over the green Function block in App Lab itself, it will bring up a popup and you can click on the “See Examples” link to see a few examples of how the block is used.
If you don’t see the function block, you may be inside a lesson where students aren’t expected to know that yet, so they would have to “remix” their project in order to have access to that (and all other) AppLab blocks.
If I misunderstood your question, please respond and we’ll take another shot at it!
Best wishes,
Mike