E-Pen InMotion E-Pen Manuale Utente Pagina 14

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 15
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 13
Primates do Primes
1. Ask the user how many primes they want. Calculate as many primes as the user wants and display a list of them. Remember that 1
is not a prime number. The first prime number is 2.
Hints:
To find out if one number is divisible by another, use the mod block in Operators. This tells you the remainder of
division. For example, 7 mod 3 is 1 because 7 divided by 3 has a remainder of 1.
Before you create your script, write down what your program will do on a piece of paper. For example, what numbers do
you need to divide by to figure out if a number is prime? When can you stop? What blocks will you use?
2. Name your project Primates do Primes and save it.
Vedere la pagina 13
1 2 ... 9 10 11 12 13 14 15

Commenti su questo manuale

Nessun commento