Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will Medders #159

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
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
42 changes: 21 additions & 21 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 All @@ -19,37 +19,37 @@ 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`
- ![Week 1](/images/mod_1_cal_week_1.png)
- ![Week 2](/images/mod_1_cal_week_2.png)
- ![Week 3](/images/mod_1_cal_week_3.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: [Click here](https://gist.github.com/wmedders21/445748e88590946e184f01abda2a1f34)

### 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: [Click Here](https://gist.github.com/wmedders21/473afb41058c38e7b542ed3d9262c0be)

### 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: [Click here](https://gist.github.com/wmedders21/0e209f7c5d271393da98ba7bc2414c07)

## 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!
32 changes: 28 additions & 4 deletions final_prep/annotations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
# Use the # to create a new comment

# Build a Bear

#Define method build_a_bear with parameters name, age, fur, clothes, and special_power.
def build_a_bear(name, age, fur, clothes, special_power)
#Declare greeting variable to a string that interpolates the name variable.
greeting = "Hey partner! My name is #{name} - will you be my friend?!"
#Declare a demographics variable to an array with name and age.
demographics = [name, age]
#Declare a power_saying variable to a string with special_power interpolated.
power_saying = "Did you know that I can #{special_power}?"
#Declare built_bear variable to a hash with the following key/value pairs: basic_info/demographics,
#clothes/clothes, exterior/fur, cost/49.99, sayings/[greeting, power_saying, "Goodnight my friend!"], is_cuddly/true.
built_bear = {
'basic_info' => demographics,
'clothes' => clothes,
Expand All @@ -16,28 +21,47 @@ def build_a_bear(name, age, fur, clothes, special_power)
'sayings' => [greeting, power_saying, "Goodnight my friend!"],
'is_cuddly' => true,
}
#Write code that can return the value of built_bear
return built_bear
#End defining build_a_bear method
end

#Invoke method build_a_bear with the following arguments: 'Fluffy', 4, 'brown',
#['pants', 'jorts', 'tanktop'], 'give you nightmares'.
build_a_bear('Fluffy', 4, 'brown', ['pants', 'jorts', 'tanktop'], 'give you nightmares')
#Invoke method build_a_bear with the following arguments: 'Sleepy', 2, 'purple',
#['pajamas', 'sleeping cap'], 'sleeping in'.
build_a_bear('Sleepy', 2, 'purple', ['pajamas', 'sleeping cap'], 'sleeping in')


# FizzBuzz

#Define a method called fizzbuzz with parameters called num_1, num_2, and range.
def fizzbuzz(num_1, num_2, range)
#Create a for loop for a variable named i from 1 to range variable.
(1..range).each do |i|
#Write a conditional statement to see if 0 can be the remainder of the division of i/num_1 AND ALSO i/num_2
if i % num_1 === 0 && i % num_2 === 0
#Print fizzbuzz if the above is true
puts 'fizzbuzz'
#Continue conditional statement to see if 0 can be the remainder of the division of i/num_1
elsif i % num_1 === 0
#Print fizz to terminal if above is true
puts 'fizz'
#Continue conditional statement to see if 0 can be the remainder of the division of i/num_2
elsif i % num_2 === 0
#Print buzz to terminal if above is true
puts 'buzz'
#Continue conditional statement providing all statements have fail thus far.
else
#If all the above conditionals are not true, print the value of i
puts i
#End if-statement
end
#End for loop
end
#End define method
end

#Call the function fizzbuzz with the arguments 3, 5, and 100.
fizzbuzz(3, 5, 100)
fizzbuzz(5, 8, 400)
#Call the function fizzbuzz with the arguments 5, 8, and 400.
fizzbuzz(5, 8, 400)
108 changes: 87 additions & 21 deletions final_prep/mod_zero_hero.rb
Original file line number Diff line number Diff line change
@@ -1,42 +1,70 @@
# 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 = "Cab Lord"
special_ability = "find a cab during any rush hour"
# 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 = "Hi, my name is #{hero_name}!"
catchphase = "I have the power to #{special_ability}!"
# Declare two variables - power AND energy - set to integers

power = 10
energy = 50
# 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 = true
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 = ["Idiot Boy", "Mean Lady", "Tough Guy"]
sidekicks = ["Mighty Guy", "Baroness Betty", "Bald Bart"]
# Print the first sidekick to your terminal

puts sidekicks[0]
# Print the last arch_enemy to the terminal

puts arch_enemies[-1]
# Write some code to add a new arch_enemy to the arch_enemies array

arch_enemies.push("Dumbo")
# 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.delete_at(0)
# 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

# Your function should include an if/else statement that meets the following criteria

def assess_situation(danger_level, save_the_day, bad_excuse)

if danger_level == 99
puts "I think I forgot to lock up my 1992 Toyota Coralla. Be right back."
elsif danger_level == 21
puts "Never fear, the Courageous Curly Bracket is here!"
puts
elsif danger_level > 50
puts bad_excuse
elsif danger_level > 10 && danger_level < 50
puts save_the_day
else
puts "Meh. Hard pass."
end
end

puts assess_situation(60, "Hurray! We win!", "We're totally outnumbered!")
puts assess_situation(5, "Hurray! We win!", "We're totally outnumbered!")
puts assess_situation(25, "Hurray! We win!", "We're totally outnumbered!")


# 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.
Expand All @@ -47,6 +75,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."
puts assess_situation(99, "Hurray! We win!", "We're totally outnumbered!")
puts assess_situation(21, "Hurray! We win!", "We're totally outnumbered!")
puts assess_situation(3, "Hurray! We win!", "We're totally outnumbered!")

# Declare a new variable - scary_monster - assigned to an hash with the following key/values
# - name (string)
Expand All @@ -55,30 +86,65 @@
# - citiesDestroyed (array)
# - luckyNumbers (array)
# - address (hash with following key/values: number , street , state, zip)
scary_monster = {
"name" => "The Sire",
"smell" => "rotten flesh",
"weight" => 250,
"citiesDestroyed" => ["Salem", "Tres Piedras", "Big Bend"],
"luckyNumbers" =>[34, 65, 12],
"address" => {"number" => 666, "street" => "Demonshire Blvd", "state" => "Mississippi", "zip" => "10666"}

}

# 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
def initialize(name, super_power, age)
@name=name
@super_power=super_power
@age=age
@arch_nemesis="Nowhere Man"
@power_level=100
@energy_level=50
end


def say_name
puts "#{@name}"
end
def maximize_energy
energy_level = 1000
puts energy_level
end
def gain_power(factor)
power_level = @power_level * factor
puts power_level
end
end


# - 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

# - Create 2 instances of your SuperHero class

big_guy_bob = SuperHero.new("Big Guy Bob", "perfect hair", 40)
big_guy_bob.say_name
big_guy_bob.maximize_energy
big_guy_bob.gain_power(20)

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

#I got hung up on the initialization section on the last exercise. Specifically line 127. But I think I get it now.
# What parts felt most comfortable to you?

#I feel comfortable working with variables and arrays
# What skills do you need to continue to practice before starting Mod 1?

#Apparently working with Classes.
Binary file added images/mod_1_cal_week_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mod_1_cal_week_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mod_1_cal_week_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 8 additions & 10 deletions section1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ Section 1 is estimated to take a total of 6-10 hours to complete. Part C is the

If you've talked to any alum or near-alum of Turing, one thing they likely shared is "Turing teaches you how to learn". For creators of tech, the learning never ends. Not after graduating a program, not after 20 years of experience. We will provide more support as you are starting out, then release some of that support so you are equipped to learn on your own once you graduate. While we provide more support at the beginning, we also intentionally support you in building skills and habits that will help you do that successfully.

One of those pieces is in how developers approach vocabulary. Knowing technical vocabulary will allow you to get more out of reading doucmentation and tutorials, and will allow you to communicate well with teams and ask good questions when you need help. Each section of your pre-work (and each lesson once you start Mod 1) will start with a vocabulary section. We don't always give you the definitions - this is intentional. You will create your own definition after having several opportunities to read definitions and see examples.

Here's what we ask you do:
- Find a special spot in your notebook for vocabulary and JavaScript reserved keywords. Mark it with a post-it or bookmark, so it's easy to find and come back to
- When you start a new section of pre-work, write down each term. Leave plenty of space for (future) notes
Expand Down Expand Up @@ -139,7 +137,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 +147,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
4 changes: 3 additions & 1 deletion section1/exercises/booleans.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
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
Loading