Exercise Weekend

Now you get to make some functions!

  • Rewrite our shipping calculator function so that it divides the distance by the weight and then adds 5 to get the final shipping cost.
  • Create a website that calculates the square of any number by multiplying that number by itself. Include a form which allows the user to enter a number, and then display both the input number and the output number back to the user after making the calculation.
  • Create another encryption website where the user enters three phrases into a form. Then the three phrases are put into a function which reverses the first one, capitalizes all letters in the second one, and makes the third one capitalized and reversed. Then all three new strings should be concatenated (added together) into one string within the function and then returned. Display the new string in the browser under the original phrases.