From 9af9e86241d10cb694902bfc474e2e1116de81d8 Mon Sep 17 00:00:00 2001 From: Brian Flynn Date: Mon, 9 Apr 2018 16:37:19 -0400 Subject: [PATCH 1/5] added newFile.js --- Lesson1-Git/newFile.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Lesson1-Git/newFile.js diff --git a/Lesson1-Git/newFile.js b/Lesson1-Git/newFile.js new file mode 100644 index 000000000..e69de29bb From c06a6ea02cdb5981b9800cd1f09dcdb0897f7883 Mon Sep 17 00:00:00 2001 From: bflynn4141 Date: Mon, 9 Apr 2018 19:27:32 -0400 Subject: [PATCH 2/5] Update homework.html --- Lesson2-HTML-CSS/homework/homework.html | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Lesson2-HTML-CSS/homework/homework.html b/Lesson2-HTML-CSS/homework/homework.html index b722c6acc..3f2149a5b 100644 --- a/Lesson2-HTML-CSS/homework/homework.html +++ b/Lesson2-HTML-CSS/homework/homework.html @@ -1 +1,21 @@ - \ No newline at end of file +
+

+ Brian Flynn +

+

Lambda School

+

HTML/CSS Homework

+
+ + My favorite food is perogis because of their texture. They're easy to cook and very tasty. Baba's Perogis are the best place in New York. +
+ Visit Baba's for some perogis! +
+ +
+
    +
  • Perogis with salt
  • + +
  • Perogis with applesauce
  • + +
+
From 75c03bf6a02859016e9d1a99cb5bc6576f66e82b Mon Sep 17 00:00:00 2001 From: Brian Flynn Date: Thu, 12 Apr 2018 18:19:57 -0400 Subject: [PATCH 3/5] added new file, homework.css --- Lesson3-CSS-Positioning/homework/homework.css | 48 +++++++++++++++---- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/Lesson3-CSS-Positioning/homework/homework.css b/Lesson3-CSS-Positioning/homework/homework.css index a45394a92..8cf681d32 100644 --- a/Lesson3-CSS-Positioning/homework/homework.css +++ b/Lesson3-CSS-Positioning/homework/homework.css @@ -8,36 +8,64 @@ in this folder, you are in the wrong place. /* We will start this one off for you: */ #exerciseOne { - + text-align: center; } /* Exercise Two: Positioning a Header Bar*/ - -/* Place code here */ +#exerciseTwo{ + display:none; +} /* Exercise Three: */ -/* Place code here */ +#exerciseThree{ + top: 100px + left: 200px; +} /* Exercise Four: */ - -/* Place code here */ +#exerciseFour{ + positon: fixed; +} /* Exercise Five */ +#exerciseFive{ -/* Place code here */ - +display: flex; + justify-content: space-evenly; + align-items: center; +} /* Exercise Six */ -#exerciseSeven { - display: flex; +#exerciseFive { + flex-direction: row-reverse; + +} + + +/* Exercise Seven */ + +#exerciseSeven{ + display: flex; +} + +#itemOne{ + color = red; + width = 200px + align-self: flex-start; +} + +#itemTwo{ + color = blue; + width = 300px + align-self: flex-start; } From 3768a4c72b68283e6556082895cc99d15a529e8e Mon Sep 17 00:00:00 2001 From: Brian Flynn Date: Fri, 13 Apr 2018 19:32:04 -0400 Subject: [PATCH 4/5] added new File, lesson 4 --- Lesson4-JS-I/homework/homework.js | 97 +++++++++++++++++------------- Lesson4-JS-I/homework/homework.jss | 0 2 files changed, 54 insertions(+), 43 deletions(-) create mode 100644 Lesson4-JS-I/homework/homework.jss diff --git a/Lesson4-JS-I/homework/homework.js b/Lesson4-JS-I/homework/homework.js index ca9b3e138..fef9dd4ae 100755 --- a/Lesson4-JS-I/homework/homework.js +++ b/Lesson4-JS-I/homework/homework.js @@ -2,22 +2,22 @@ //In these first 6 questions, replace `null` with the answer //create a string variable, it can contain anything -let newString = null ; +let newString = boom; //create a number variable, it an be any number -let newNum = null ; +let newNum = 4; //create a boolean variable -let newBool = null ; +let newBool = true; //solve the following math problem -let newSubtract = 10 - null === 5; +let newSubtract = 10 - 5 === 5; //Solve the following math problem -let newMultiply = 10 * null === 40 ; +let newMultiply = 10 * 4 === 40; //Solve the following math problem: -let newModulo = 21 % 5 === null ; +let newModulo = 21 % 5 === 1; @@ -27,113 +27,125 @@ let newModulo = 21 % 5 === null ; //Do not change any of the function names function returnString(str) { - //simply return the string provided: str + return str } function add(x, y) { - // x and y are numbers - // add x and y together and return the value - // code here + return x + y } function subtract(x, y) { - // subtract y from x and return the value - // code here + return x - y } function multiply(x, y) { - // multiply x by y and return the value - // code here + return x * y } function divide(x, y) { - // divide x by y and return the value - // code here + return x / y } function areEqual(x, y) { - // return true if x and y are the same - // otherwise return false - // code here + if (x=y) { + return true; + } + + return false; } function areSameLength(str1, str2) { - // return true if the two strings have the same length - // otherwise return false - // code here + if (str1.length==str2.length){ + return true; + } + + return false; + } function lessThanNinety(num) { - // return true if the function argument: num , is less than ninety - // otherwise return false - // code here + if (num < 90) { + return true; + } + + return false; } function greaterThanFifty(num) { // return true if num is greater than fifty // otherwise return false // code here + if (num < 50) { + return true; + } + + return false; } function getRemainder(x, y) { - // return the remainder from dividing x by y - // code here + return x % y } function isEven(num) { - // return true if num is even - // otherwise return false - // code here + if (n % 2 == 0) { + return true; + } + + return false; } function isOdd(num) { - // return true if num is odd - // otherwise return false - // code here + if Math.abs(n % 2 == 1) { + return true; + } + + return false; } function square(num) { - // square num and return the new value - // hint: NOT square root! - // code here + return Math.pow(num,2); } function cube(num) { - // cube num and return the new value - // code here + return Math.pow(num,3); } function raiseToPower(num, exponent) { - // raise num to whatever power is passed in as exponent - // code here + return num ^ exponent; } function roundNumber(num) { // round num and return it // code here + return math.round(num); } function roundUp(num) { // round num up and return it // code here + return math.roundUp(num); } function addExclamationPoint(str) { // add an exclamation point to the end of str and return the new string // 'hello world' -> 'hello world!' // code here + return str + '!'; } function combineNames(firstName, lastName) { // return firstName and lastName combined as one string and separated by a space. // 'Lambda', 'School' -> 'Lambda School' // code here + + return firstName + ' ' + lastName; } function getGreeting(name) { // Take the name string and concatenate other strings onto it so it takes the following form: // 'Sam' -> 'Hello Sam!' // code here + return 'Hello' + ' ' + lastName + '!'; } // The next three questions will have you implement math area formulas. @@ -141,12 +153,11 @@ function getGreeting(name) { function getRectangleArea(length, width) { // return the area of the rectangle by using length and width - // code here + return (length * width); } function getTriangleArea(base, height) { - // return the area of the triangle by using base and height - // code here + return (base * height) / 2; } // Do not modify code below this line. diff --git a/Lesson4-JS-I/homework/homework.jss b/Lesson4-JS-I/homework/homework.jss new file mode 100644 index 000000000..e69de29bb From c3fa61503058cdf46c71a21783b2d7ea29b82e48 Mon Sep 17 00:00:00 2001 From: Brian Flynn Date: Mon, 16 Apr 2018 20:56:00 -0400 Subject: [PATCH 5/5] added new file, JS-II/homework.js --- Lesson5-JS-II/homework/homework.js | 75 ++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/Lesson5-JS-II/homework/homework.js b/Lesson5-JS-II/homework/homework.js index e43bc267c..d0486bddb 100755 --- a/Lesson5-JS-II/homework/homework.js +++ b/Lesson5-JS-II/homework/homework.js @@ -4,11 +4,35 @@ function multiplyArguments() { // use the arguments keyword to multiply all of the arguments together and return the product // if no arguments are passed in return 0 // if one argument is passed in just return it + + var product = 1; + if (arguments.length === 0) { + return arguments[0]; + } + + for (var i = 0; i M arguments.length; i++) { + product *= arguments [i]; + } + + if (multiplyArguments) { + return product + } + else return 0 } function getBiggest(x, y) { // x and y are integers. Return the larger integer // if they are the same return either one + + if (x > y) { + return x; + } + else if (x < y) { + return y; + } + else { + return x || y; + } } function greeting(language) { @@ -17,16 +41,39 @@ function greeting(language) { // language: 'English' -> 'Hello!' // language: 'Spanish' -> 'Hola!' // if language is undefined return 'Hello!' + if (language === 'German') { + return 'Guten Tag!'; + } + else if (language === 'English'){ + return 'Hello!'; + } + else if (language === 'Spanish'){ + return 'Hola!'; + } + else { + return 'Hello!'; + } } function isTenOrFive(num) { // return true if num is 10 or 5 // otherwise return false + if (num === 10 || num === 5){ + return true; + } + else { + return false; + } } function isInRange(num) { // return true if num is less than 50 and greater than 20 // otherwise return false + if (num < 50 && num > 50){ + return true; + } + else { + return false; } function isInteger(num) { @@ -36,6 +83,12 @@ function isInteger(num) { // -10 -> true // otherwise return false // hint: you can solve this using Math.floor + if (Math.floor(num % 1 === 0)){ + return true; + } + else { + return false; + } } function fizzBuzz(num) { @@ -43,6 +96,18 @@ function fizzBuzz(num) { // if num is divisible by 5 return 'buzz' // if num is divisible by 3 & 5 return 'fizzbuzz' // otherwise return num + if (num % 3 === 0 && num % 5 === 0){ + return 'fizzbuzz'; + } + else if (num % 3 === 0){ + return 'fizz'; + } + else if (num % 5 === 0){ + return 'buzz' + } + else { + return num + } } function isPrime(num) { @@ -53,6 +118,16 @@ function isPrime(num) { // note: 0 and 1 are NOT considered prime numbers } +if (num === 0 || num ===1){ + return false +} +for (let i = 2; 1 < num; i++){ + if (num % 1 ===0){ + return false; + } + } + return true; +} // Do not modify code below this line.