This file contains 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 characters
asdf(){ | |
mkdir GeneralAssembly | |
cd GeneralAssembly | |
mkdir Homework Notes Projects Outcomes | |
mkdir -p Homework/week01/day01 | |
mkdir -p Notes/week01/day01 | |
echo "Keep calm and carry on" > README.md | |
echo "Hey there, student! Welcome to WDI6! I just set up this directory tree for you:" |
This file contains 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 characters
NO_NUCLEAR_LAUNCH_SEQUENCES_HERE/ | |
nopeNotALaunchSequence.sh | |
TOP_SECRET/ | |
SERIOUSLY_TOP_SECRET/ | |
YOU_PROBABLY_SHOULDNT_BE_IN_HERE/ | |
totallyNotNuclearCodes.txt | |
CAT_PHOTOS/ | |
nefariousMisterMittens.jpg | |
FLASH_DRIVE/ |
This file contains 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 characters
puts "Hi. I am C3P0, human-cyborg relations." | |
puts "whats your name?" | |
name = gets.chomp | |
puts "it's a pleasure to meet you #{name}, have you ever met a protocal droid before?" | |
user_answer = gets.chomp | |
puts "#{user_answer}? How interesting, for someone from around these parts." | |
This file contains 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 characters
# W04D03 Quiz | |
=begin | |
Your solutions to all the problems below (except for Problem 1) should be included in this file. | |
Assuming the database "quiz" mentioned in Problem 3 has been created, this file should be able to be executed in the command line (`ruby d03_quiz.rb`) without throwing any errors. | |
=end | |
## Problem 1 | |
=begin | |
As you would with a regular homework assignment, please pull this file to your homework repository, make the necessary edits, push it, and then make a pull request. |
This file contains 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 characters
# Da Quiz | |
=begin | |
Your solutions to all the problems below (except for Problem 0) | |
should be included in this file. | |
=end | |
## Problem 0 |
This file contains 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 characters
// given array, indicate all evens and all odds | |
array = [2,3,4,5,6,7,8,9,10,13,15,16,17,19,20,25,26,28,50,51,57,58,72,75,101,207,333,344,367,401,405,788,909] | |
for (x=0; x < array.length; x++){ | |
if( array[x] % 2 == 0 ){ | |
console.log("this is even") | |
}; | |
else{ | |
console.log("odd") |