I made the isprime() function, but in scratch. How to use: Wait for a bit for better quality. I choose to not click the run without screen refresh button for adding primes because... well... it will lag A LOT if I do that. Just make a range and it will give you the primes. It is useful and it took me a LONG time to make. PLS like and star I worked REALLY hard. You can see the PrePrimes for the primes that the calculator generated. The range is for longer jumps, so if you just want like the first 500 you just wait for a few moments and the PrePrimes will give you the answer. How I made this project (oversimplified verison): Basically I used a MIM (Myblock In Myblock) to make it. I need it because of the if-else blocks. If you are an experienced scratcher, you should know what I'm saying. Bye~ What is a prime? A prime is a number who has no divisors, or numbers that can be multiplied by another number to create the desired, well, number except for 1 and itself. DON'T MAKE THE NUMBER TOO BIG. IT WILL CRASH. Try to find the largest number you can get :D Why is 67 a prime number (⊙ˍ⊙)
I was doing my math book (uhg) and it required to find all the primes between 200-300 and I was like C'MON! Good thing my mom said that I could code a calculator when I was finished with my math on scratch instead of doing it (thank god) and I coded it in 1 minute and my mom was impressed. But, as you can see, "my version" earlier was HORRIBLE. It detects all the prime numbers before it and if they all do not mod 0 then it works as a prime. But as you can see, that involved A LOT of if-elses. So, I got 2 problems about this today: the first prime after 2000 and the first 5 primes after 1000, and I was like MAN, I'm going to make this a function so that it could work, so I did. In case my math book gives me these problems again! DON'T ADVERTISE!!!