ScratchData LogoScratchData
Back to scratch3223's profile

Prime number generator

SCscratch3223•Created May 28, 2016
Prime number generator
1
1
17 views
View on Scratch

Instructions

Click the green flag and watch it calculate prime numbers. If you don't trust it, test it yourself! find a prime it gives you, and look up if that is really prime. If you want the prime number generator to go even faster, try turbo mode : ) The program works by increasing the number it divides by the prime to look for factors other than 1 and the prime number, this way it finds composite numbers, and the code prints a number to the list if it didn't find factors (because it is prime.) To test if it really is a factor, it finds the remainder of the number divided by a factor. if there is no remainder, then it is a factor. If there is a remainder, then it is a decimal answer and is not a factor. I used the () mod () block to find the remainder.

Description

programming by me ideas and inspiration from other scratch projects like this, and a Youtube tutorial, but the code is original

Project Details

Project ID111672217
CreatedMay 28, 2016
Last ModifiedJune 8, 2016
SharedMay 28, 2016
Visibilityvisible
CommentsAllowed