Create an introductory-level program in Snap (Scratch works) to test if a positive integer is a happy number. The first section of the lesson discusses happy numbers, including a definition and some continuation thoughts. The second section works you through the creation of a program that takes an input and tests if it is a happy number or not.
If students already have experience programming, then this activity works well for the hour of code, especially in a math environment. If students are new to programming,, then it needs an experienced leader.
Related terms: snap programming, scratch programming, coding, hour of code, happy numbers