Scheme Exercises

back to exercise list       previous     next

Group:     Exercise: 45/48 

is-small-prime:  Is the given number between 2 and 10 a prime?

Create the function "is-small-prime" that will be given an integer greater than 1 and less than 11. It will return #t if that number is a prime, otherwise #f. This can be done, of course, by testing all 9 numbers between 2 and 10, but there's an easier way.