Hit the flag! Enter a positive number. No letters or special characters please! It will give you that number's factorial. For those of you who don't know, a factorial of the number is the number multiplied with all the whole numbers before it. For example, the factorial of 5 is 5 * 4 * 3 * 2 * 1. Also, as you may find out, factorials can get pretty (extremely) big. So if you give it a number above 170 then it will show 'infinity' (not because I programmed it to, but because the number is so big that it cannot be displayed).
Background and sprite from Scratch library. Coding by me! This is part of my series 'The Clever Hat' where there is a hat (duh) and it does some amazing stuff with numbers. In episode 2, it can identify even the biggest prime numbers. Be sure to view these episodes! If you have any ideas for future episodes, feel free to post your suggestions in the comments or on my profile! Link to episode 1: https://scratch.mit.edu/projects/326398044 episode 2: https://scratch.mit.edu/projects/326398800 episode 4: https://scratch.mit.edu/projects/337765322 episode 5: https://scratch.mit.edu/projects/371931345 episode 6: https://scratch.mit.edu/projects/371939295 Episode 7: https://scratch.mit.edu/projects/384586776 Episode 8: https://scratch.mit.edu/projects/384591895 Episode 9: