Exercise: Number
Write a function that given a string it return true if the string is a number. As there might be several definitions of what is the number create several solutions one for each definition:
- Non negative integer.
- Integer. (Will you also allow + in front of the number or only - ?
- Real number. (Do you allow .3 ? What about 2. ?
- In scientific notation. (something like this: 2.123e4 )