Updated calc file to get ready for posting including some regexp to check that the correct type of input was given.