Home The Project Plans Mission
Login Register
Home
Prime Numbers from 1 to 100 with Scratch

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

https://scratch.mit.edu/projects/377993994

🤖

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.

🎯 Scegli l'Agente AI

Come preferisci studiare questo articolo?

📝
Riassuntore
Genera un riassunto strutturato dell'articolo
🧠
Schematizzatore
Crea mappe concettuali e schemi gerarchici
🎓
Tutor Socratico
Ti interroga sull'articolo con domande progressive

Contact us for a free trial