ScratchData LogoScratchData
Back to gregatku's profile

m^n (Recursion - and n!)

GRgregatku•Created December 20, 2016
m^n (Recursion - and n!)
1
1
25 views
View on Scratch

Instructions

m^n (Recursion - and n!) Click the Green Flag to start. Abby tells you the remaining instructions. Note: The n-slider's minimum value is 1 to avoid n! going into an infinite loop and blowing the Scratch stack. Of course functions for m^n and n! could be written more simply without recursion with a "repeat n" Block just using the simple variables m^n and n! but the point is to teach Recursion with simple examples.

Description

Created by @gregatku for use in Coding Classes for Kids Unlimited, for whom I work as a Coding teacher. Students will be given this code minus the code for the n! Block, with the task to write it. (n! is n factorial: n x n-1 x n-2 x ... x 3 x 2 x 1)

Project Details

Project ID137384304
CreatedDecember 20, 2016
Last ModifiedOctober 2, 2024
SharedDecember 20, 2016
Visibilityvisible
CommentsAllowed