Forked from rwarbelow/mod_0_session_2_practice_tasks.md
Last active
February 20, 2019 02:43
-
-
Save nathangthomas/5e74d9b598a09dd5488c205863110967 to your computer and use it in GitHub Desktop.
Revisions
-
nathangthomas revised this gist
Feb 19, 2019 . 1 changed file with 4 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -125,20 +125,19 @@ Imagine that you're taking your favorite board game and turning it into a comput - [x] Create a list below of **three real-life situations** where iteration is used. For each situation, explain why it would be an example of iteration. - Walking. Move left leg. Move right leg. Repeat unil destination is reached. In this example the instructions for each leg are repeated until the condition of desired desitnation is reached. - Every year on my birthday I get +1 birthday candles on my cake until I reach 30 years old. This is interation becasue the instructions of adding the previous years number of candles +1 is repeated until the condition of 30 is met. - I practice "Folsom Prision Blues" on guitar until I can play it perfectly. This is iteration becasue the act of practicing the same song over and over is a cyclical process that incrimentally results in my desired condition of being able to play the song without making mistakes is made. - [x] Create a list below of **three programming situations** where iteration would be used. For each situation, explain why it would be an example of iteration. - A weather app that continuially refreshes to provide the user with constant up to date information. This is an example of iteration because the program has to continuillay repeat it's process to retrieve information and refesh page until the app is closed. - Looping through data to find and log participant's ages. Take current year. Subtract birth year to get age. Continue to next participant. This is an example of iteration because the code is giving specific instructions to take current year and subtract birth year to get age. It then moves on to the next set of data and repeats until all participants' ages have been caluclated. - Software that is searching a database for the fingerprint of a suspect. Simularly to the above examples the software is using iteration to search each fingerprint in the database until it finds a match. ### 4. Modify your Bash Profile (10 min) - [x] Watch [this video](https://drive.google.com/file/d/1s_CDBnxHSA0HDWldjosulthAvBi-C-d5/view?usp=sharing) and follow each step to modify your own bash profile. As mentioned in the video, you will need this snippet below: ``` # get current branch in git repo -
nathangthomas revised this gist
Feb 19, 2019 . 1 changed file with 20 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -108,29 +108,33 @@ console.log(Object.values(picnic)); Imagine that you're taking your favorite board game and turning it into a computer-based game. - [x] Name of board game: CHESS - [x] Use the space below to categorize game data into each of the following data types. You should have a **minimum of two** pieces of data for each category. 1. String data: "CONGRATULATIONS YOU WIN!" "Nice try, you loose." 1. Integer and/or float data: 8 68 1. Boolean data: true false 1. Array data: pieces = ["king", "queen", "rook", "biship", "knight", "pawn"] 1. Hash or Object data: Players = { "one" => "white", "two" => "black"} ### 3. Iteration (30 min) - [x] On a blank sheet of paper, create a diagram that shows how you understand iteration working. Be detailed and get creative! When you're done, take a photo of your diagram and post it in the Mod 0 channel on Slack. Your instructor(s) will provide feedback in a thread. _(If you're feeling extra fancy, feel free to create your diagram using software instead of pencil and paper)_ - [x] Create a list below of **three real-life situations** where iteration is used. For each situation, explain why it would be an example of iteration. - My truck battery is dead. In order to get back on the road I have to ask each person who passes if they have jumpercables. This is itertion because I have to ask each person I incounter until a certain condition is met. In this case the condition being met is that I find someone with jumpercables. - Every year on my birthday I get +1 birthday candles on my cake until I reach 30 years old. This is interation becasue the instructions of adding the previous years number of candles +1 is repeated until the condition of 30 is met. - I practice "Folsom Prision Blues" until I can play it perfectly. This is iteration becasue the act of practicing the same song over and over is a cyclical process that incrimentally results in my desired condition of being able to play the song without making mistakes is made. - [x] Create a list below of **three programming situations** where iteration would be used. For each situation, explain why it would be an example of iteration. - An algorithm that loops through a group of numbers until all possible number combos have been made. This is an example of iteration because the algorithm has to repeat the task of reorganizing the numbers over and over until all combos have been made. - Looping through data to find and log participant's ages. Take current year. Subtract birth year to get age. Continue to next participant. This is an example of iteration because the code is giving specific instructions to take current year and subtract birth year to get age. It then moves on to the next set of data and repeats until all participants' ages have been caluclated. - Software that is searching a database for the fingerprint of a suspect. Simularly to the above examples the software is using iteration to search each fingerprint in the database until it finds a match. ### 4. Modify your Bash Profile (10 min) -
nathangthomas revised this gist
Feb 18, 2019 . No changes.There are no files selected for viewing
-
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -94,7 +94,8 @@ console.log(Object.values(picnic)); - [x] What did you Google to help you with this task, and how did you pick your results? I searched: 1. what is object values method javascript 2. What is Object.values() javascript 3. enumerable computer scicence -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -89,8 +89,8 @@ YogiBear: false <br/> }; <br/> console.log(Object.values(picnic)); >>["Dream Lake", "all of my favorite fruits", Array(2), "basket", 11, false] - [x] What did you Google to help you with this task, and how did you pick your results? -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -89,7 +89,7 @@ YogiBear: false <br/> }; <br/> console.log(Object.values(picnic)); <br/> ["Dream Lake", "all of my favorite fruits", Array(2), "basket", 11, false] -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 5 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -80,18 +80,17 @@ console.log(favoriteFruits.slice(1,4)); - [x] In your own words, what does the JavaScript object [values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values) method do? As you're explaining, be sure to provide an example. Your answer: JavaScript Object.values() return an array of an object's set of values in the same order that a for ...in statement would inerate over it. var picnic={ <br/> location:"Dream Lake", <br/> food: "all of my favorite fruits", <br/> other: ["Tajin", "Chamoy"], <br/> transport: "basket", <br/> numberOfItems: 11, <br/> YogiBear: false <br/> }; <br/> console.log(Object.values(picnic)); ["Dream Lake", "all of my favorite fruits", Array(2), "basket", 11, false] - [x] What did you Google to help you with this task, and how did you pick your results? -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -79,19 +79,19 @@ console.log(favoriteFruits.slice(1,4)); - [x] In your own words, what does the JavaScript object [values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values) method do? As you're explaining, be sure to provide an example. Your answer: JavaScript Object.values() return an array of an object's set of values in the same order that a for ...in statement would inerate over it. var picnic={ <br/> location:"Dream Lake",<br/> food: "all of my favorite fruits", <br/> condiment: "Tajin", <br/> transport: "basket", <br/> numberOfItems: "11", <br/> YogiBear: false <br/> }; <br/> <br/> console.log(Object.values(picnic)); >>["Dream Lake", "all of my favorite fruits", "Tajin", "basket", "11", false] - [x] What did you Google to help you with this task, and how did you pick your results? -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 25 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -59,7 +59,7 @@ favorite_fruits.push("rambutan") I choose my results carefully after cross referencing several sources. - [x] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example. Your answer: The slice() method in JavaScript reterns the selected strings in an array as a new array. You can give the slice() method a start and end argument. The resulting new array does not include the end argument. favoriteFruits = ["pineapple", "mango", "watermellon", "peach", "plum","rambutan"]; <br/> @@ -77,10 +77,32 @@ console.log(favoriteFruits.slice(1,4)); 3. what is the function of slice method in javascript - [x] In your own words, what does the JavaScript object [values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values) method do? As you're explaining, be sure to provide an example. Your answer: JavaScript Object.values() return an array of an object's set of values in the same order that a for ...in statement would inerate over it. var picnic={ location:"Dream Lake", food: "all of my favorite fruits", condiment: "Tajin", transport: "basket", numberOfItems: "11", YogiBear: false }; <br/> console.log(Object.values(picnic)); ["Dream Lake", "all of my favorite fruits", "Tajin", "basket", "11", false] - [x] What did you Google to help you with this task, and how did you pick your results? I searched: 1. what is object values method javascript 2. What is Object.values() javascript 3. enumerable computer scicence 3. what are enumerable properties 4. for in loop javascript In order to fully understand this one I had to define enumerable and look up for...in loops. I choose results based off of familiarity with the sorce however I also dug around for different descriptions to try to understand the terms as well as the Object.values() method better. ### 2. Data Types (15 min) -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 16 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -59,9 +59,23 @@ favorite_fruits.push("rambutan") I choose my results carefully after cross referencing several sources. - [ ] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example. Your answer: The slice() method in JavaScript reterns the selected strings in an array as a new array. You can give the slice() method a start and end argument. The resulting new array does not include the end argument. favoriteFruits = ["pineapple", "mango", "watermellon", "peach", "plum","rambutan"]; <br/> console.log(favoriteFruits.slice(3)); >>["peach", "plum", "rambutan"] console.log(favoriteFruits.slice(1,4)); >>["mango", "watermellon", "peach"] - [x] What did you Google to help you with this task, and how did you pick your results? I searched: 1. what is the slice method in javascript 2. what is the "slice()" mentod in javascript 3. what is the function of slice method in javascript - [ ] In your own words, what does the JavaScript object [values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values) method do? As you're explaining, be sure to provide an example. Your answer: -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -59,7 +59,7 @@ favorite_fruits.push("rambutan") I choose my results carefully after cross referencing several sources. - [ ] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example. Your answer: - [ ] What did you Google to help you with this task, and how did you pick your results? -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -59,7 +59,7 @@ favorite_fruits.push("rambutan") I choose my results carefully after cross referencing several sources. - [x] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example. Your answer: - [ ] What did you Google to help you with this task, and how did you pick your results? -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ favorite_fruits.drop(2) 2. what does the drop method do ruby 3. drop method vs shift method I read over sevearl descriptions and and choose my results once I noticed there was consistancy in both the descriptions and the examples. - [x] In your own words, what does the Ruby array [push](https://ruby-doc.org/core-2.4.0/Array.html#method-i-push) method do? As you're explaining, be sure to provide an example. Your answer: The Ruby array push method adds a value or vlaues to the end of an array and returns the new array. @@ -36,7 +36,7 @@ favorite_fruits.push("rambutan") 1. push array ruby 2. what is array.push in ruby I choose my rusults in the same way I did in the previous question except I used more tabs this go around. - [x] In your own words, what does the Ruby string [split](https://ruby-doc.org/core-2.4.0/String.html#method-i-split) method do? As you're explaining, be sure to provide an example. Your answer: -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,11 +42,11 @@ I choose my rusults in the same way I did in the previous question except I used - [x] In your own words, what does the Ruby string [split](https://ruby-doc.org/core-2.4.0/String.html#method-i-split) method do? As you're explaining, be sure to provide an example. Your answer: A string split in Ruby can cut or divide a string into pieces based on a deliminter returing an array of smaller strings. my_string = "These are my favorite fruits." <br/> my_array= my_string.split(" ") >> ["These", "are", "my", "favorite", "fruits."] my_string = "These are my favorite fruits." <br/> my_array= my_string.split("") >>["T", "h", "e", "s", "e", " ", "a", "r", "e", " ", "m", "y", " ", "f", "a", "v", "o", "r", "i", "t", "e", " ", "f", "r", "u", "i", "t", "s", "."] -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 25 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,10 +17,10 @@ favorite_fruits.drop(2) >> ["watermellon", "peach", "plum"] - [x] What did you Google to help you with this task, and how did you pick your results? I searched: 1. drop method ruby 2. what does the drop method do ruby 3. drop method vs shift method I read over sevearl descriptions and and choose my results once I noticed there was consistancy in both the descriptions and the examples. @@ -32,16 +32,32 @@ favorite_fruits.push("rambutan") - [x] What did you Google to help you with this task, and how did you pick your results? I searched: 1. push array ruby 2. what is array.push in ruby I choose my rusults in the same way I did in the previous question except I used more tabs this go around. - [x] In your own words, what does the Ruby string [split](https://ruby-doc.org/core-2.4.0/String.html#method-i-split) method do? As you're explaining, be sure to provide an example. Your answer: A string split in Ruby can cut or divide a string into pieces based on a deliminter returing an array of smaller strings. my_string = "These are my favorite fruits." my_array= my_string.split(" ") >> ["These", "are", "my", "favorite", "fruits."] my_string = "These are my favorite fruits." my_array= my_string.split("") >>["T", "h", "e", "s", "e", " ", "a", "r", "e", " ", "m", "y", " ", "f", "a", "v", "o", "r", "i", "t", "e", " ", "f", "r", "u", "i", "t", "s", "."] - [x] What did you Google to help you with this task, and how did you pick your results? I searched: 1. what is string split in Ruby 2. what does the split method do Ruby 3. split method examples Ruby I choose my results carefully after cross referencing several sources. - [ ] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example. Your answer: -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Documentation of a langauge, framework, or tool is the information that describe - [x] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer: The Ruby array drop method takes out a number of items from the beginning of an array. Drop takes an argument that determines the number of items to remove and returns the rest of the elements in the array. favorite_fruits = ["pineapple", "mango", "watermellon", "peach", "plum"] <br/> favorite_fruits.drop(2) >> ["watermellon", "peach", "plum"] -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Documentation of a langauge, framework, or tool is the information that describe - [x] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer: The Ruby array drop method takes out a number of items from the beginning of an array. Drop takes an argument that determines the number of items to remove and returns the rest of the elements in the array. favorite_fruits = ["pineapple", "mango", "watermellon", "peach", "plum"] favorite_fruits.drop(2) >> ["watermellon", "peach", "plum"] @@ -26,7 +26,7 @@ I read over sevearl descriptions and and choose my results once I noticed there - [x] In your own words, what does the Ruby array [push](https://ruby-doc.org/core-2.4.0/Array.html#method-i-push) method do? As you're explaining, be sure to provide an example. Your answer: The Ruby array push method adds a value or vlaues to the end of an array and returns the new array. favorite_fruits = ["watermellon", "peach", "plum"] <br/> favorite_fruits.push("rambutan") >>["watermellon", "peach", "plum", "rambutan"] -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Documentation of a langauge, framework, or tool is the information that describe - [x] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer: The Ruby array drop method takes out a number of items from the beginning of an array. Drop takes an argument that determines the number of items to remove and returns the rest of the elements in the array. favorite_fruits = ["pineapple", "mango", "watermellon", "peach", "plum"] <br/> favorite_fruits.drop(2) >> ["watermellon", "peach", "plum"] -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 25 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,13 +10,34 @@ Documentation of a langauge, framework, or tool is the information that describe **NOTE:** The linked documentation for each question below is a good starting place, but you should also be practicing your Googling skills and sifting through the results to find relevant and helpful sites. - [x] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer: The Ruby array drop method takes out a number of items from the beginning of an array. Drop takes an argument that determines the number of items to remove and returns the rest of the elements in the array. favorite_fruits = ["pineapple", "mango", "watermellon", "peach", "plum"] favorite_fruits.drop(2) >> ["watermellon", "peach", "plum"] - [x] What did you Google to help you with this task, and how did you pick your results? I searched: 1. drop method ruby 2. what does the drop method do ruby 3. drop method vs shift method I read over sevearl descriptions and and choose my results once I noticed there was consistancy in both the descriptions and the examples. - [x] In your own words, what does the Ruby array [push](https://ruby-doc.org/core-2.4.0/Array.html#method-i-push) method do? As you're explaining, be sure to provide an example. Your answer: The Ruby array push method adds a value or vlaues to the end of an array and returns the new array. favorite_fruits = ["watermellon", "peach", "plum"] favorite_fruits.push("rambutan") >>["watermellon", "peach", "plum", "rambutan"] - [x] What did you Google to help you with this task, and how did you pick your results? I searched: 1. push array ruby 2. what is array.push in ruby I choose my rusults in the same way I did in the previous question except I used more tabs this go around. - [ ] In your own words, what does the Ruby string [split](https://ruby-doc.org/core-2.4.0/String.html#method-i-split) method do? As you're explaining, be sure to provide an example. Your answer: -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Documentation of a langauge, framework, or tool is the information that describe **NOTE:** The linked documentation for each question below is a good starting place, but you should also be practicing your Googling skills and sifting through the results to find relevant and helpful sites. - [ ] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer: - [ ] What did you Google to help you with this task, and how did you pick your results? -
nathangthomas revised this gist
Feb 18, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Documentation of a langauge, framework, or tool is the information that describe **NOTE:** The linked documentation for each question below is a good starting place, but you should also be practicing your Googling skills and sifting through the results to find relevant and helpful sites. - [x] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer: - [ ] What did you Google to help you with this task, and how did you pick your results? -
rwarbelow revised this gist
Feb 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -111,7 +111,7 @@ function parse_git_dirty { fi } export PS1="\u\w\`parse_git_branch\`$ " ``` ### 5. Questions/Comments/Confusions -
rwarbelow revised this gist
Feb 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -111,7 +111,7 @@ function parse_git_dirty { fi } export PS1="\u\w\`parse_git_branch\` $ " ``` ### 5. Questions/Comments/Confusions -
rwarbelow revised this gist
Feb 14, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -59,7 +59,7 @@ Imagine that you're taking your favorite board game and turning it into a comput - - ### 4. Modify your Bash Profile (10 min) - [ ] Watch [this video](https://drive.google.com/file/d/1s_CDBnxHSA0HDWldjosulthAvBi-C-d5/view?usp=sharing) and follow each step to modify your own bash profile. As mentioned in the video, you will need this snippet below: -
rwarbelow revised this gist
Feb 14, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -61,7 +61,7 @@ Imagine that you're taking your favorite board game and turning it into a comput ### 4. Modify your Bash Profile (15 min) - [ ] Watch [this video](https://drive.google.com/file/d/1s_CDBnxHSA0HDWldjosulthAvBi-C-d5/view?usp=sharing) and follow each step to modify your own bash profile. As mentioned in the video, you will need this snippet below: ``` # get current branch in git repo -
rwarbelow revised this gist
Feb 14, 2019 . 1 changed file with 52 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -61,7 +61,58 @@ Imagine that you're taking your favorite board game and turning it into a comput ### 4. Modify your Bash Profile (15 min) - [ ] Watch [this video]() and follow each step to modify your own bash profile. As mentioned in the video, you will need this snippet below: ``` # get current branch in git repo function parse_git_branch() { BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` if [ ! "${BRANCH}" == "" ] then STAT=`parse_git_dirty` echo "[${BRANCH}${STAT}]" else echo "" fi } # get current status of git repo function parse_git_dirty { status=`git status 2>&1 | tee` dirty=`echo -n "${status}" 2> /dev/null | grep "modified:" &> /dev/null; echo "$?"` untracked=`echo -n "${status}" 2> /dev/null | grep "Untracked files" &> /dev/null; echo "$?"` ahead=`echo -n "${status}" 2> /dev/null | grep "Your branch is ahead of" &> /dev/null; echo "$?"` newfile=`echo -n "${status}" 2> /dev/null | grep "new file:" &> /dev/null; echo "$?"` renamed=`echo -n "${status}" 2> /dev/null | grep "renamed:" &> /dev/null; echo "$?"` deleted=`echo -n "${status}" 2> /dev/null | grep "deleted:" &> /dev/null; echo "$?"` bits='' if [ "${renamed}" == "0" ]; then bits=">${bits}" fi if [ "${ahead}" == "0" ]; then bits="*${bits}" fi if [ "${newfile}" == "0" ]; then bits="+${bits}" fi if [ "${untracked}" == "0" ]; then bits="?${bits}" fi if [ "${deleted}" == "0" ]; then bits="x${bits}" fi if [ "${dirty}" == "0" ]; then bits="!${bits}" fi if [ ! "${bits}" == "" ]; then echo " ${bits}" else echo "" fi } export PS1="\u\w\`parse_git_branch\` " ``` ### 5. Questions/Comments/Confusions -
rwarbelow revised this gist
Feb 14, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -61,7 +61,7 @@ Imagine that you're taking your favorite board game and turning it into a comput ### 4. Modify your Bash Profile (15 min) - [ ] Watch [this video]() and follow each step to modify your own bash profile. ### 5. Questions/Comments/Confusions -
rwarbelow revised this gist
Feb 14, 2019 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -59,3 +59,12 @@ Imagine that you're taking your favorite board game and turning it into a comput - - ### 4. Modify your Bash Profile (15 min) Watch [this video]() and follow each step to modify your own bash profile. ### 5. Questions/Comments/Confusions If you have any questions, comments, or confusions from the any of the readings that you would an instructor to address, list them below: 1. -
rwarbelow revised this gist
Feb 14, 2019 . 1 changed file with 11 additions and 21 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,35 +10,25 @@ Documentation of a langauge, framework, or tool is the information that describe **NOTE:** The linked documentation for each question below is a good starting place, but you should also be practicing your Googling skills and sifting through the results to find relevant and helpful sites. - [ ] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer: - [ ] What did you Google to help you with this task, and how did you pick your results? - [ ] In your own words, what does the Ruby array [push](https://ruby-doc.org/core-2.4.0/Array.html#method-i-push) method do? As you're explaining, be sure to provide an example. Your answer: - [ ] What did you Google to help you with this task, and how did you pick your results? - [ ] In your own words, what does the Ruby string [split](https://ruby-doc.org/core-2.4.0/String.html#method-i-split) method do? As you're explaining, be sure to provide an example. Your answer: - [ ] What did you Google to help you with this task, and how did you pick your results? - [ ] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example. Your answer: - [ ] What did you Google to help you with this task, and how did you pick your results? - [ ] In your own words, what does the JavaScript object [values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values) method do? As you're explaining, be sure to provide an example. Your answer: - [ ] What did you Google to help you with this task, and how did you pick your results? ### 2. Data Types (15 min) @@ -57,7 +47,7 @@ Imagine that you're taking your favorite board game and turning it into a comput ### 3. Iteration (30 min) - [ ] On a blank sheet of paper, create a diagram that shows how you understand iteration working. Be detailed and get creative! When you're done, take a photo of your diagram and post it in the Mod 0 channel on Slack. Your instructor(s) will provide feedback in a thread. _(If you're feeling extra fancy, feel free to create your diagram using software instead of pencil and paper)_ - [ ] Create a list below of **three real-life situations** where iteration is used. For each situation, explain why it would be an example of iteration. - -
rwarbelow revised this gist
Jan 21, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Session 2 Practice Tasks The assignments listed here should take you approximately 2 hours. To start this assignment, click the button in the upper right-hand corner that says **Fork**. This is now your copy of the document. Click the **Edit** button when you're ready to start adding your answers. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.
NewerOlder