From e1129f9075afe258f05209aae19e8c5181afd2d6 Mon Sep 17 00:00:00 2001 From: Thom Page Date: Thu, 16 Jun 2016 16:02:38 -0400 Subject: [PATCH] things --- .../arithmetic_geometric_solution.js | 3 ++ .../homework_instructions.md | 24 ++++++++++++- .../morning_exercise/arithmetic_geometric.md | 36 +++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 morning_exercise_resources/arithmetic_geometric/arithmetic_geometric_solution.js rename unit_02/w05d04/homework/{vampires_express => }/homework_instructions.md (90%) create mode 100644 unit_02/w05d04/morning_exercise/arithmetic_geometric.md diff --git a/morning_exercise_resources/arithmetic_geometric/arithmetic_geometric_solution.js b/morning_exercise_resources/arithmetic_geometric/arithmetic_geometric_solution.js new file mode 100644 index 0000000..f493f89 --- /dev/null +++ b/morning_exercise_resources/arithmetic_geometric/arithmetic_geometric_solution.js @@ -0,0 +1,3 @@ +console.log('x'); + + diff --git a/unit_02/w05d04/homework/vampires_express/homework_instructions.md b/unit_02/w05d04/homework/homework_instructions.md similarity index 90% rename from unit_02/w05d04/homework/vampires_express/homework_instructions.md rename to unit_02/w05d04/homework/homework_instructions.md index 9993592..8bf66e7 100644 --- a/unit_02/w05d04/homework/vampires_express/homework_instructions.md +++ b/unit_02/w05d04/homework/homework_instructions.md @@ -39,7 +39,7 @@ The app will also be able to store new vampires. You click on a 'new vampire' li ### DIRECTIONS -- Make a new Express app called `vampires`. +- Use the `vampires_express` starter code. - Run `npm install` to install all the dependencies that are already in `package.json`. @@ -170,6 +170,28 @@ The commit message should read:

+### BONUS - STYLING +Add styling to your page + +Express can access static assets like css files, images, and front-end javascript so that you can make your pages look and behave nicely. + +First, tell express to look in the 'public' folder for static assets: +``` +app.use(express.static('public')); +``` + +Next, create a `public` folder in the root of the project. Express will interpret the public folder as the root your static assets. + +In your public folder make a style.css and add some stuff in the file. + +Link your style.css in one of your views in the normal way with the `link` tag in the head of the html. + +
+** Commit your work.**
+The commit message should read:
+"Commit 8: added static assets". +
+ ### NOTES ON FORMS diff --git a/unit_02/w05d04/morning_exercise/arithmetic_geometric.md b/unit_02/w05d04/morning_exercise/arithmetic_geometric.md new file mode 100644 index 0000000..b4169fc --- /dev/null +++ b/unit_02/w05d04/morning_exercise/arithmetic_geometric.md @@ -0,0 +1,36 @@ +![ga](http://mobbook.generalassemb.ly/ga_cog.png) + +# WDI-PANTHALASSA + +--- +Title: Arithmetic or Geometric
+Type: Morning Exercise
+Duration: 45 mins
+Creator: Thom Page
+Course: WDIr-Panthalassa
+ +--- + +## Arithmetic or Geometric sequence? + +Write a method `arith_geo` that takes an **array of numbers** and returns the string "Arithmetic" if the sequence in the array follows an arithmetic pattern, or returns "Geometric" if it follows a geometric pattern. If the sequence doesn't follow either pattern return -1. + +An **arithmetic sequence** is one where the difference between each of the numbers is consistent, eg. the difference between each number is `5`. + +Whereas in a **geometric sequence**, each term after the first is multiplied by some constant or common ratio. + +``` +Arithmetic example: [2, 4, 6, 8] +``` + +``` +Arithmetic example: [20, 28, 36, 44] +``` + +``` +Geometric example: [2, 6, 18, 54] +``` + +``` +Geometric example: [6, 12, 24, 48] +``` \ No newline at end of file