E-Pen InMotion E-Pen Manuel d'utilisateur Page 14

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 15
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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.
Vue de la page 13
1 2 ... 9 10 11 12 13 14 15

Commentaires sur ces manuels

Pas de commentaire