Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions final_prep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Congrats on making it to the Mod 0 Final Prep! Complete the final exercises belo

### Final Technical Prep

You've learned a ton about some of the core foundations of Javascript! Show us how far you've come by completing the following exercises! You will be using your work from these exercises in your first day of Mod 1!
You've learned a ton about some of the core foundations of Javascript! Show us how far you've come by completing the following exercises! You will be using your work from these exercises in your first day of Mod 1!

- [ ] Complete the [Mod Zero Hero Challenge](./mod_zero_hero.rb)
- [ ] Complete the [Annotation Challenge](./annotations.rb)
- [x] Complete the [Mod Zero Hero Challenge](./mod_zero_hero.rb)
- [x] Complete the [Annotation Challenge](./annotations.rb)

### Refactor Previous Work
You've learned A LOT over the last few weeks as it relates to technical content - chances are, you probably have some code from your previous exercises that is either sloppy, incorrect, poorly named, etc. Before starting Mod 1, we want you to `refactor` your code - which is the process of adjusting or improving your code for readability and accuracy.
You've learned A LOT over the last few weeks as it relates to technical content - chances are, you probably have some code from your previous exercises that is either sloppy, incorrect, poorly named, etc. Before starting Mod 1, we want you to `refactor` your code - which is the process of adjusting or improving your code for readability and accuracy.

Some things to consider as you refactor include...
- Are my variable names easy to understand/convey the data type they are assigned to?
Expand Down Expand Up @@ -38,18 +38,18 @@ When you are finished, add screenshots of your calendar so we can provide feedba

### Mentorship Prep
Mentorship is an integral part of the Turing experience and will help jumpstart your technical career. In order to get your mentor relationship started on the right foot, please complete the following deliverables:
- [ ] Complete the [Mentorship DTR Prep](https://gist.github.com/ericweissman/51965bdcbf42970d43d817818bfaef3c)
- [ ] Add link to your gist here:
- [x] Complete the [Mentorship DTR Prep](https://gist.github.com/ericweissman/51965bdcbf42970d43d817818bfaef3c)
- [x] Add link to your gist here: [Mentorship gist](https://gist.github.com/Tross0208/d6d5fb2b9f4e41e486d332ae0bcbe615)

### Lesson Prep
You've learned a lot about how to take strong notes during Mod 0. Show us your skills while you learn how to pre-teach content for your first lesson in Mod 1!
- [ ] Complete the [Pre Teaching Practice exercise](https://gist.github.com/ericweissman/0036e8fe272c02bd6d4bb14f42fd2f79) gist
- [ ] Add a link to your gist here:
- [x] Complete the [Pre Teaching Practice exercise](https://gist.github.com/ericweissman/0036e8fe272c02bd6d4bb14f42fd2f79) gist
- [x] Add a link to your gist here:[Lesson Prep](https://gist.github.com/Tross0208/509b47cf45a6a57b473f7b2bc60676af)

### Group Work Prep
As part of Turing's project-based learning approach, you will often be working in pairs or larger groups. In order to set yourself (and your team) up for success, it is important to ensure you are prepared to be an equitable contributor and teammate.
- [ ] Complete the [DTR Guiding Questions](https://gist.github.com/ericweissman/c56f3a98cdce761808c21d498a52f5c6)
- [ ] Add a link to your gist here:
- [x] Complete the [DTR Guiding Questions](https://gist.github.com/ericweissman/c56f3a98cdce761808c21d498a52f5c6)
- [x] Add a link to your gist here: [Group work](https://gist.github.com/Tross0208/c10e7b42792a5f31a45045d9cc664d73)

## All Done? How to Submit your M1 Prework
When you have completed *all* the activities described above, follow the steps below to submit your technical prework.
Expand Down Expand Up @@ -86,4 +86,4 @@ What is your plan and how are you going to hold yourself to it? Specifically...
- What personal items/events are important to you during this time? How are you going to make sure those are not neglected? (Hint, block time on the calendar for them!)

## Extensions
Check out our thoughts on [extension activities](https://mod0.turing.io/prework/extensions) if you find yourself with some extra time before starting Mod 1!
Check out our thoughts on [extension activities](https://mod0.turing.io/prework/extensions) if you find yourself with some extra time before starting Mod 1!
44 changes: 22 additions & 22 deletions final_prep/annotations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,40 @@

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really strong annotations! Good use of technical vocab, too ☺️

# Build a Bear

def build_a_bear(name, age, fur, clothes, special_power)
greeting = "Hey partner! My name is #{name} - will you be my friend?!"
demographics = [name, age]
power_saying = "Did you know that I can #{special_power}?"
built_bear = {
'basic_info' => demographics,
'clothes' => clothes,
'exterior' => fur,
'cost' => 49.99,
'sayings' => [greeting, power_saying, "Goodnight my friend!"],
'is_cuddly' => true,
def build_a_bear(name, age, fur, clothes, special_power) # Method taking in 5 parameters
greeting = "Hey partner! My name is #{name} - will you be my friend?!" #Variable greeting with interpolated name
demographics = [name, age] #Variable demographics set to array of name and age
power_saying = "Did you know that I can #{special_power}?" #Variable power saying set to string with interpolated special power
built_bear = { # Hash with 6 key:value pairs
'basic_info' => demographics, #Key basic info with value of array variable demographics
'clothes' => clothes,# Key clothes set to passed value from clothes parameter
'exterior' => fur,# Key exterior set to passed value from fur parameter
'cost' => 49.99, #key cost set to value 49.99
'sayings' => [greeting, power_saying, "Goodnight my friend!"],#Key sayings with value set to array of variable greeting, variable power saying, and string
'is_cuddly' => true, #Key is cuddly with value set to boolean
}
return built_bear
return built_bear #return hash built bear
end

build_a_bear('Fluffy', 4, 'brown', ['pants', 'jorts', 'tanktop'], 'give you nightmares')
build_a_bear('Sleepy', 2, 'purple', ['pajamas', 'sleeping cap'], 'sleeping in')
build_a_bear('Fluffy', 4, 'brown', ['pants', 'jorts', 'tanktop'], 'give you nightmares') #Calls method build a bear
build_a_bear('Sleepy', 2, 'purple', ['pajamas', 'sleeping cap'], 'sleeping in') #Calls method build a bear


# FizzBuzz

def fizzbuzz(num_1, num_2, range)
(1..range).each do |i|
if i % num_1 === 0 && i % num_2 === 0
def fizzbuzz(num_1, num_2, range) #Method fizzbuzz taking in 3 parameters
(1..range).each do |i| #From one to value of parameter range, with counter
if i % num_1 === 0 && i % num_2 === 0 # If counter is evenly divisble into both parameter values output fizzbuzz to console
puts 'fizzbuzz'
elsif i % num_1 === 0
elsif i % num_1 === 0 # If counter is evenly divisble into first paramter value output fizz to console
puts 'fizz'
elsif i % num_2 === 0
elsif i % num_2 === 0 # If counter is evenly divisble into second paramter value output buzz to console
puts 'buzz'
else
else #If counter is not evenly divisble into either value, output counter value to console
puts i
end
end
end

fizzbuzz(3, 5, 100)
fizzbuzz(5, 8, 400)
fizzbuzz(3, 5, 100) #Call method fizzbuzz with 3 parameters
fizzbuzz(5, 8, 400) #Call method fizzbuzz again with 3 different parameters
95 changes: 81 additions & 14 deletions final_prep/mod_zero_hero.rb
Original file line number Diff line number Diff line change
@@ -1,40 +1,62 @@
# Challenge - See if you can follow the instructions and complete the exercise in under 30 minutes!

# Declare two variables - hero_name AND special_ability - set to strings
hero_name = "Blob"
special_ability = "amorphism"

# Declare two variables - greeting AND catchphrase
# greeting should be assigned to a string that uses interpolation to include the hero_name
# catchphrase should be assigned to a string that uses interpolation to include the special_ability

greeting = "Ahhh what am I?"
catchphrase = "Couldn't I at least be non-newtonian?"

# Declare two variables - power AND energy - set to integers
power = 30
energy = 2

# Declare two variables - full_power AND full_energy
# full_power should multiply your current power by 500
# full_energy should add 150 to your current energy
full_power = power * 500
full_energy = energy + 150

# Declare two variables - is_human and identity_concealed - assigned to booleans

is_human = false
identitity_concealed = false

# Declare two variables - arch_enemies AND sidekicks
# arch_enemies should be an array of at least 3 different enemy strings
# sidekicks should be an array of at least 3 different sidekick strings

arch_enemies = ["Sidewalk Gum", "Photo ID", "Gutters" ]
sidekicks = ["Large Tupperware", "Wheel Barrow", "Hydrophilic Coating" ]
# Print the first sidekick to your terminal
puts sidekicks[0]

# Print the last arch_enemy to the terminal
puts arch_enemies[2]

# Write some code to add a new arch_enemy to the arch_enemies array

arch_enemies.push "Thirsty Seagull"
# Print the arch_enemies array to terminal to ensure you added a new arch_enemey

puts arch_enemies
# Remove the first sidekick from the sidekicks array

sidekicks.shift
# Print the sidekicks array to terminal to ensure you added a new sidekick

puts sidekicks
# Create a function called assess_situation that takes three arguments - danger_level, save_the_day, bad_excuse
# - danger_level should be an integer
# - save_the_day should be a string a hero would say once they save the day
# - save_the_day should be a string a hero would say once they save the day
# - bad_excuse should be a string a hero would say if they are too afraid of the danger_level
def assess_situation (danger_level, save_the_day, bad_excuse)
if danger_level > 50
puts bad_excuse
elsif danger_level > 10 && danger_level <=50
puts save_the_day
else
puts "Meh. Hard pass."
end
end

# Your function should include an if/else statement that meets the following criteria
# - Danger levels that are above 50 are too scary for your hero. Any danger level that is above 50 should result in printing the bad_excuse to the terminal
Expand All @@ -47,6 +69,9 @@
# assess_situation(99, announcement, excuse) > Should print - 'I think I forgot to lock up my 1992 Toyota Coralla. Be right back.'
#assess_situation(21, announcement, excuse) > should print - 'Never fear, the Courageous Curly Bracket is here!'
#assess_situation(3, announcement, excuse) > should print - "Meh. Hard pass."
assess_situation(99, announcement, excuse)
assess_situation(21, announcement, excuse)
assess_situation(3, announcement, excuse)

# Declare a new variable - scary_monster - assigned to an hash with the following key/values
# - name (string)
Expand All @@ -55,18 +80,59 @@
# - citiesDestroyed (array)
# - luckyNumbers (array)
# - address (hash with following key/values: number , street , state, zip)
scary_monster = {
name: "Blarg",
smell: "Copper and Gardenia",
weight: 312,
citiesDestroyed: ["Carmel, IN", "Elizabeth Township, NJ"],
luckyNumbers: [7, 13, 21],
address: {
number: 515,
street: "Walla Walla Way",
state: "Washington",
zip: 12345
}
}


# Create a new class called SuperHero
# - Your class should have the following DYNAMIC values
# - name
# - name
# - super_power
# - age
# - age
# - Your class should have the following STATIC values
# - arch_nemesis, assigned to "The Syntax Error"
# - power_level = 100
# - energy_level = 50

# - energy_level = 50
class SuperHero
@@arch_nemesis = "The Syntax Error"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd advise making these instance variables - with only 1 @ and inside the initialize method.

@@power_level = 100
@@energy_level = 50
def initialize (name, super_power, age)
@name = name#= "The Sloth"
@super_power = super_power#= "Super slow"
@age = age #= 31

end

def say_name
puts @name
end

def maximize_energy
@@energy_level = 1000
end

def gain_power(power)
@@power_level += power
end
end

thunder_fingers = SuperHero.new("Thunder Fingers", "Fast typing", 24)
google_master = SuperHero.new("Google Master", "The first google search is always right", 34)

thunder_fingers.say_name
google_master.say_name
# - Create the following class methods
# - say_name, should print the hero's name to the terminal
# - maximize_energy, should update the energy_level to 1000
Expand All @@ -77,8 +143,9 @@

# Reflection
# What parts were most difficult about this exerise?

# Nested hashes took some time to figure out. Static vs dynamic class variables was new as well.
# What parts felt most comfortable to you?

#Syntax is starting to sink in. I don't think I had to look up basic formatting questions here.
# What skills do you need to continue to practice before starting Mod 1?

#I dont have a good grasp of which topics I don't know until I am confronted by a new topic/issue.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's totally reasonable right now - this is brand new! And this is why you have instructors with a thoughtful curriculum - they will put challenges in front of you that you need to tackle, and provide feedback on how you're progressing.

#On second thought my vocabulary is poor. I do need to practice that.
16 changes: 8 additions & 8 deletions section1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ This will open the `section1` directory in Atom. You should be able to see the d

1. Next, you will complete several lessons from the Learn Ruby the Hard Way Tutorial. *For ***each*** lesson* ***follow these directions closely***:

1. Create a file within your `section1` directory that will contain this lesson's work. Verify that you are within the directory by using terminal command `pwd`. If you are not, `cd` into your `section1` directory. Once you are there, use the `touch` command in your terminal to create a file. For the first lesson, name this file `ex1.rb`. For each subsequent lesson, use `ex2.rb`, `ex3.rb`, so on, so forth.
1. Create a file within your `section1` directory that will contain this lesson's work. Verify that you are within the directory by using terminal command `pwd`. If you are not, `cd` into your `section1` directory. Once you are there, use the `touch` command in your terminal to create a file. For the first lesson, name this file `ex1.rb`. For each subsequent lesson, use `ex2.rb`, `ex3.rb`, so on, so forth.

1. Work through the lesson, **typing** the code into your file, and running it in the terminal with `ruby ex1.rb`, replacing `ex1` with the actual file name of what you'd like to run. Make sure the output you get is similar to what the lesson shows. If you get an error saying "No such file or directory", be sure to verify the directory you are located in via the terminal- running command `ls` should show the file you are trying to run.

Expand All @@ -149,19 +149,19 @@ This will open the `section1` directory in Atom. You should be able to see the d

1. Check off the items below as you complete the steps you just read for each lesson. ***Remember to create a file containing your work for each lesson!***

- [ ] [A Good First Program](https://learnrubythehardway.org/book/ex1.html)
- [x] [A Good First Program](https://learnrubythehardway.org/book/ex1.html)

- [ ] [Comments in Code](https://learnrubythehardway.org/book/ex2.html)
- [x] [Comments in Code](https://learnrubythehardway.org/book/ex2.html)

- [ ] [Numbers and Math](https://learnrubythehardway.org/book/ex3.html)
- [x] [Numbers and Math](https://learnrubythehardway.org/book/ex3.html)

- [ ] [Variables and Names](https://learnrubythehardway.org/book/ex4.html)
- [x] [Variables and Names](https://learnrubythehardway.org/book/ex4.html)

- [ ] [Strings](https://learnrubythehardway.org/book/ex5.html)
- [x] [Strings](https://learnrubythehardway.org/book/ex5.html)

- [ ] [More Strings](https://learnrubythehardway.org/book/ex6.html)
- [x] [More Strings](https://learnrubythehardway.org/book/ex6.html)

- [ ] [Asking for Input](https://learnrubythehardway.org/book/ex11.html)
- [x] [Asking for Input](https://learnrubythehardway.org/book/ex11.html)


1. Work through the [Strings](http://tutorials.jumpstartlab.com/projects/ruby_in_100_minutes.html#3.-strings) and [Numbers](http://tutorials.jumpstartlab.com/projects/ruby_in_100_minutes.html#5.-numbers) sections from Ruby in 100 Minutes. For each of these sections, open an `irb` session by typing `irb` into your terminal and type in the code snippets provided.
Expand Down
7 changes: 7 additions & 0 deletions section1/ex1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
puts "Hello World!"
puts "Hello Again"
puts "I like typing this."
puts "This is fun."
puts "Yay! Printing."
puts "I'd much rather you 'not'."
puts 'I "said" do not touch this'
9 changes: 9 additions & 0 deletions section1/ex2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# A comment, this is so you can read your program later.
# Anything after the # is ignored by ruby.

puts "I could have code like this." # and the comment after is ignored

# You can also use a comment to "disable" or comment out a piece of code:
# puts "This won't run."

puts "This will run."
23 changes: 23 additions & 0 deletions section1/ex3.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
puts "I will now count my chickens:"

puts "Hens #{25 + 30 / 6}"
puts "Roosters #{100 - 25 * 3 % 4}"

puts "Now I will count the eggs:"

puts 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6

puts "Is it true that 3 + 2 < 5 - 7?"

puts 3 + 2 < 5 - 7

puts "What is 3 + 2? #{3 + 2}"
puts "What is 5 - 7? #{5 - 7}"

puts "Oh, that's why it's false."

puts "How about some more."

puts "Is it greater? #{5 > -2}"
puts "Is it greater or equal? #{5 >= -2}"
puts "Is it less or equal? #{5 <= -2}"
16 changes: 16 additions & 0 deletions section1/ex4.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cars = 100
space_in_a_car = 4.0
drivers = 30
passengers = 90
cars_not_driven = cars - drivers
cars_driven = drivers
carpool_capacity = cars_driven * space_in_a_car
average_passengers_per_car = passengers / cars_driven


puts "There are #{cars} cars available."
puts "There are only #{drivers} drivers available."
puts "There will be #{cars_not_driven} empty cars today."
puts "We can transport #{carpool_capacity} people today."
puts "We have #{passengers} to carpool today."
puts "We need to put about #{average_passengers_per_car} in each car."
17 changes: 17 additions & 0 deletions section1/ex5.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
my_name = 'Zed A. Shaw'
my_age = 35 # not a lie in 2009
my_height = 74 # inches
my_weight = 180 # lbs
my_eyes = 'Blue'
my_teeth = 'White'
my_hair = 'Brown'

puts "Let's talk about #{my_name}."
puts "He's #{my_height} inches tall."
puts "He's #{my_weight} pounds heavy."
puts "Actually that's not too heavy."
puts "He's got #{my_eyes} eyes and #{my_hair} hair."
puts "His teeth are usually #{my_teeth} depending on the coffee."

# this line is tricky, try to get it exactly right
puts "If I add #{my_age}, #{my_height}, and #{my_weight} I get #{my_age + my_height + my_weight}."
Loading