Completed function strToNumber

Added and completed the function that will return a number if a string
that is a number is passed as an argument otherwise it will inform the
user to input a number and try again