A factorial is an operator that multiplies a number by all of the positive integers less than that number. For example, 5! = 5 * 4 * 3 * 2 * 1 = 120.
By definition, 0! = 1.
Make a web page to compute factorials. Do it without recursion, and then try it with recursion if you're up for a challenge. (Look online for info on recursion.)
A palindrome is any word, phrase, number, or other sequence of characters which reads the same backward or forward. Create a web page to identify whether or not a word is a palindrome.
Bonus points: Make your code check a string of words. For example: "Hello olleH" is a palindrome by our definition.
Given a number, write a method that returns all of the prime numbers less than that number.
This is a tricky problem, and I want you to use the Sieve of Eratosthenes to solve it. Here's how the Sieve of Eratosthenes works to find a number up to a given
primeequal 2, the first prime number.
prime, remove all multiples of
primefrom the list.
number, all the remaining numbers in the list are primes.
You also might find this video helpful in explaining the Sieve.