ScratchData LogoScratchData
Back to MrRubiksSC's profile

Prime Number Generator

MRMrRubiksSC•Created August 21, 2012
Prime Number Generator
47
31
1357 views
View on Scratch

Instructions

Shift-click the flag. Make sure it says "Turbo Mode". Press Space to start. Press D to delete everything Press the Stop sign to pause. Press Space to resume. Press S to show variables. Press h to hide variables (to make it run faster).

Description

A prime number is a positive integer that is divisible by exactly 2 factors : one and the number itself. One is not prime because it only has one distinct factor. 2 is prime: only 1 and 2. 4 is not prime: 1, 2, and 4. 3, 5, and 7 are prime, but 9 is not: 1,3, and 9 are its factors. A prime number generator is a program that makes a list of these numbers (duh). This is my method of the prime generator. It took lots of experimenting to find the most efficient algorithm. I don't use these variable names, but it is the same algorithm. I assure you that ALL of the numbers in the list are prime.

Project Details

Project ID2740236
CreatedAugust 21, 2012
Last ModifiedJune 18, 2016
SharedAugust 21, 2012
Visibilityvisible
CommentsAllowed