Here's some background knowledge: Some mathematician came up with 2 rules, that when used together, always bring any number to 1. Here are the rules: If the number is odd, multiply it by 3 and add 1 (hence 3x + 1). If the number is even, divide it by 2. The idea is that any number will get stuck in this loop: 4 /2 = 2 2/2 = 1 1 x 3 + 1 = 4 This program runs your number of choice through these sequences, stopping at 1. Instructions: Click Space to restart Only whole numbers! Works best in full screen. Comes with sound effect(s). Note: The error pops up if: -You didn't enter a number -You entered a fraction/decimal -The number you entered was too long
Credit to this project for helping me debug code: https://scratch.mit.edu/projects/830153284