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
40 changes: 21 additions & 19 deletions final_prep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Congrats on making it to the Mod 0 Final Prep! Complete the final exercises belo

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.
Expand All @@ -19,37 +19,39 @@ Some things to consider as you refactor include...

Take your time as you go back and refactor your exercises from each section. We've included a handy checklist for you to go through below.

- [ ] I have refactored my `section1` exercises to the best of my ability
- [ ] I have refactored my `section2` exercises to the best of my ability
- [ ] I have refactored my `section3` exercises to the best of my ability
- [ ] I have refactored my `section4` exercises to the best of my ability
- [x] I have refactored my `section1` exercises to the best of my ability
- [x] I have refactored my `section2` exercises to the best of my ability
- [x] I have refactored my `section3` exercises to the best of my ability
- [x] I have refactored my `section4` exercises to the best of my ability

### Time Management Prep
In Mod 0 you've learned about different techniques for managing your time at Turing. Please create a calendar for your **first 3 weeks of Mod 1**. Feel free to make your calendar fit your style, but we suggest that your calendar should include the following:
- [ ] Standard M1 class schedule (see M1 calendar [here](https://backend.turing.io/module1/)
- [ ] Study/Project work time
- [ ] Health + Wellness
- [x] Standard M1 class schedule (see M1 calendar [here](https://backend.turing.io/module1/))
- [x] Study/Project work time
- [x] Health + Wellness

When you are finished, add screenshots of your calendar so we can provide feedback if needed!

- `Add Week 1 Screenshot Here`
- `Add Week 2 Screenshot Here`
- `Add Week 3 Screenshot Here`
- ![Mod1 Week 1](https://user-images.githubusercontent.com/93220002/140846442-6bf03a22-0225-47d2-be0a-f81507144b09.png)

- ![Mod1 Week 2](https://user-images.githubusercontent.com/93220002/140846479-734bed23-2a4b-4376-9964-59878ccd0130.png)

- ![Screen Shot 2021-11-08 at 6 44 48 PM](https://user-images.githubusercontent.com/93220002/140846496-a81e6ca3-3173-4c1b-a29c-4000e6fb028f.png)

### 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: [JD Mentorship DTR Prep](https://gist.github.com/josephdowns/627f4ab499485f0b92601bcfe4a3b5ba)

### 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: [JD Pre Teachning Practice](https://gist.github.com/josephdowns/85b342ec7d76cb8d8027bd1d88833b10)

### 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: [JD DTR Guiding Questions](https://gist.github.com/josephdowns/1ada1c98a66a0f3410eab97cad4beacd)

## 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 +88,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!
25 changes: 22 additions & 3 deletions final_prep/annotations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@

# Build a Bear

# create a method build_a_bear with arguments name, age, fur, clothes, and special_power
def build_a_bear(name, age, fur, clothes, special_power)
# define variable greeting with interpolation to inclue name
greeting = "Hey partner! My name is #{name} - will you be my friend?!"
# define variable demographics with an array containing name and age
demographics = [name, age]
# define variable power_saying with interpolation to inclued special_power
power_saying = "Did you know that I can #{special_power}?"
# define variable built_bear with hash with the following keys/values basic_info/ variable demographics,
# clothes/argument clothes, exterior/ argument fur, cost/49.99, saying/[array greeting, power_saying, "Goodnight
# my friend"], and is_cuddly/boolean true
built_bear = {
'basic_info' => demographics,
'clothes' => clothes,
Expand All @@ -16,28 +23,40 @@ def build_a_bear(name, age, fur, clothes, special_power)
'sayings' => [greeting, power_saying, "Goodnight my friend!"],
'is_cuddly' => true,
}
# returns the value of built_bear
return built_bear
# end to the method build_a_bear
end

# calling build_a_bear name = "Fluffy", age = 4, fur = "brown", clothes = ["pants",
# "jorts", "tanktop"], special_power = "give you nightmares"
build_a_bear('Fluffy', 4, 'brown', ['pants', 'jorts', 'tanktop'], 'give you nightmares')
# calling build_a_bear name = "Sleepy", age = 2, fur = "purple", clothes = ["pajamas",
# "sleeping cap"], special_power = "sleeping in"
build_a_bear('Sleepy', 2, 'purple', ['pajamas', 'sleeping cap'], 'sleeping in')


# FizzBuzz

# define method fizzbuzz with argument num_1, num_2, and range
def fizzbuzz(num_1, num_2, range)
# using the range function and the loop function, the method fizzbuzz will evaluate each number
# starting with '1' and continuing until the given integer. Setting 'i' as the argument
(1..range).each do |i|
# starting an if...else statement if the evauluated number modulo of argument num_1
# AND num_2 is equal to 0 then put 'fizzbuzz'
if i % num_1 === 0 && i % num_2 === 0
puts 'fizzbuzz'
# if the evauluated number modulo of argument num_1 is equal to 0 put 'fizz'
elsif i % num_1 === 0
puts 'fizz'
# if the evauluated number modulo of argument num_2 is equal to 0 put 'buzz'
elsif i % num_2 === 0
puts 'buzz'
# if none of the above statements are true put 'i' or the current number of the loop
else
puts i
end
end
end

fizzbuzz(3, 5, 100)
fizzbuzz(5, 8, 400)
fizzbuzz(5, 8, 400)
109 changes: 105 additions & 4 deletions final_prep/mod_zero_hero.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,96 @@

# Declare two variables - hero_name AND special_ability - set to strings

hero_name = "Silver Wolf"
special_ability = "telekinesis"

# 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 = "Hello! The name is #{hero_name}!"
catchphrase = "I'll use my #{special_ability} without delay!"

# Declare two variables - power AND energy - set to integers

power = 83
energy = 76

# 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
identity_concealed = true

# 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 = ["Argent Spectere", "Grey Ghost", "Commander Blanc"]
sidekicks = ["Cubby", "Black Bear", "Red Fox"]

# Print the first sidekick to your terminal

print sidekicks.first

# Print the last arch_enemy to the terminal

print arch_enemies.last

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

arch_enemies << "Wistful Witch"

# Print the arch_enemies array to terminal to ensure you added a new arch_enemey

print 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

sidekicks << "Kid Wolf"
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

# 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
# - Anything danger_level that is between 10 and 50 should result in printing the save_the_day string to the terminal
# - If the danger_level is below 10, it means it is not worth your time and should result in printing the string "Meh. Hard pass." to the terminal.

def assess_situation(danger_level, save_the_day, bad_excuse)

if danger_level < 10
puts "Meh. Hard pass."
elsif danger_level > 10 && danger_level < 50
puts save_the_day
else
puts bad_excuse
end
end

save_the_day = "Silver Wolf will make it right!"
bad_excuse = "I think I hear my kettle whistling. BRB."


assess_situation(99, save_the_day, bad_excuse)
assess_situation(21, save_the_day, bad_excuse)
assess_situation(3, save_the_day, bad_excuse)


#Test Cases
announcement = 'Never fear, the Courageous Curly Bracket is here!'
excuse = 'I think I forgot to lock up my 1992 Toyota Coralla. Be right back.'
Expand All @@ -56,29 +107,79 @@
# - luckyNumbers (array)
# - address (hash with following key/values: number , street , state, zip)

scary_monster = {
name: "Towering Spider",
smell: "rotten tomatoes",
weight: 2000,
citiesDestroyed: ["Stockholm", "Cairo", "Cancun"],
luckyNumbers: [4, 17, 2520],
address: {number: "4222", street: "Wagontrail", state: "CO", zip: "80014"}
}


# 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

# - 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
# - gain_power, should take an argument of a number and INCREASE the power_level by that number

class SuperHero
attr_reader :name, :super_power, :age

def initialize(name, super_power, age)
@name = name
@super_power = super_power
@age = age
end

@arch_nemesis = "The Syntax Error"
@power_level = 100
@energry_level = 50

def say_name
puts name
end

def maximize_energy
energy_level = 1000
end

def gain_power(increase)
power_level + increase
end
end

# - Create 2 instances of your SuperHero class

superhero1 = SuperHero.new("Lucy Goose", "telepathy", 26)
superhero1.say_name

superhero2 = SuperHero.new("Octavian", "super strength", 47)
superhero2.say_name

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

# The part I struggled with most was the assess_situation function. And that was mostly
# due to me not reading the directions close enough. I had created the function
# a certain way but then looking at the test cases, my function would not work. Re-reading
# the directions told me what I should do.

# What parts felt most comfortable to you?

# I felt most comfortable with the different types of variables. Maybe because we
# use variables in most other things so it has become fundamental to me.

# What skills do you need to continue to practice before starting Mod 1?

# I still need to work on objects and classes. I feel a little better about them
# but I could still use more practice.
14 changes: 7 additions & 7 deletions section1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions section1/exercises/booleans.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
p 7 > 2

# YOU DO: log to the console the result of "hello" is equal to "Hello":
puts "hello" == "Hello"

# YOU DO: log to the console the result of 3 is not equal to 4:
puts 3 != 4

# YOU DO: log to the console the result of 4 is less than or equal to 5:
puts 4 <= 5
8 changes: 8 additions & 0 deletions section1/exercises/ex1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#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.'
#puts "Here is another line."
8 changes: 8 additions & 0 deletions section1/exercises/ex11.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
print "How old are you? "
age = gets.chomp
print "How tall are you? "
height = gets.chomp
print "How much do you weigh? "
weight = gets.chomp

puts "So, you're #{age} old, #{height} tall, and #{weight} heavy."
9 changes: 9 additions & 0 deletions section1/exercises/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."
Loading