Prime Numbers from 1 to 100 with Scratch

Here is the code that inserts prime numbers into a list with code executed in Scratch!
The variables used are: N number that increments input of the algorithm that performs the primality test
factors: contains the factors of the number n and if factors are present, the countFactors is incremented
countFactors: counts how many factors are found of N
Attention to the mod operation that returns the remainder of the division
Here is the working code on the Scratch website of the MIT of Boston
Studio Assistito con l'Intelligenza Artificiale
Vuoi padroneggiare al meglio i concetti di questo articolo? Avvia lo studio assistito per generare riassunti automatici, mappe concettuali o farti interrogare con il metodo socratico.