ScratchData LogoScratchData
Back to mudkip's profile

Prime Checker

MUmudkip•Created June 7, 2008
Prime Checker
4
2
267 views
View on Scratch

Description

This project simply checks if a number is prime or not. Select a number using the slider and press spacebar to check. I basically used the property of prime numbers saying that if number p is prime, (p-1)!+1 must be divisible by p. I used the mod function to see if it was divisible, and then just changed the variable for prime or not? to match what I needed. Enjoy! It doesn't work for bigger numbers unless you download it though (since it rounds)

Project Details

Project ID182648
CreatedJune 7, 2008
Last ModifiedJune 7, 2008
SharedJune 7, 2008
Visibilityvisible
CommentsAllowed