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
Binary file added .DS_Store
Binary file not shown.
16 changes: 13 additions & 3 deletions final_prep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,33 @@ In Mod 0 you've learned about different techniques for managing your time at Tur
When you are finished, add screenshots of your calendar so we can provide feedback if needed!

- `Add Week 1 Screenshot Here`

<img width="1204" alt="Screen Shot 2021-12-16 at 2 19 33 PM" src="https://user-images.githubusercontent.com/94508708/146450561-dc8cc0ad-9957-4c27-9516-6f017cbf8808.png">


- `Add Week 2 Screenshot Here`

<img width="1209" alt="Screen Shot 2021-12-16 at 2 19 52 PM" src="https://user-images.githubusercontent.com/94508708/146450566-49a2a183-0e72-4f1d-8868-1651169c09b4.png">

- `Add Week 3 Screenshot Here`

<img width="1202" alt="Screen Shot 2021-12-16 at 2 20 02 PM" src="https://user-images.githubusercontent.com/94508708/146450568-8e374ee4-9e4e-4ac6-b634-3a0fb6027efb.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:
- [ ] Add link to your gist here: [link](https://gist.github.com/sandisz-d734m37/af069518d8f5522f5befa3fab72a7352)

### 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:
- [ ] Add a link to your gist here: [link](https://gist.github.com/sandisz-d734m37/ced4810cea95b09796b62f91e3c263e3)

### 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:
- [ ] Add a link to your gist here: [link](https://gist.github.com/sandisz-d734m37/c29855cb2d3c81d9508991c0a47f4612)

## 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
31 changes: 31 additions & 0 deletions final_prep/annotations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,70 @@

# Build a Bear

# Declare a method called 'build_a_bear' with 5 parameters
def build_a_bear(name, age, fur, clothes, special_power)
# Declare the variable 'greeting' (within the build_a_bear method) with this string assigned to it
greeting = "Hey partner! My name is #{name} - will you be my friend?!"
# Declare the variable 'demographics' with this array assigned to it
demographics = [name, age]
# Declare the variable 'power_saying' with this string assigned to it
power_saying = "Did you know that I can #{special_power}?"
# Declare the variable 'built_bear' with this hash assigned to it
built_bear = {
# Set key 'basic_info' to value 'demographics' (which is a variable)
'basic_info' => demographics,
# Set key 'clothes' to value 'clothes' (which is a parameter to be defined later)
'clothes' => clothes,
# Set key 'exterior' to value 'fur' (which is a parameter)
'exterior' => fur,
# Set key 'cost' to value '49.99' (which is a new integer)
'cost' => 49.99,
# Set the value of key 'sayings' to an array made up of 2 variables and one string
'sayings' => [greeting, power_saying, "Goodnight my friend!"],
# Set key 'is_cuddly' to boolean value 'true'
'is_cuddly' => true,
}
# end the 'build_a_bear' method
end

# Invoke the 'build_a_bear' method, passing it all 5 arguments
build_a_bear('Fluffy', 4, 'brown', ['pants', 'jorts', 'tanktop'], 'give you nightmares')
# Invoke the 'build_a_bear' method a second time, passing it all 5 arguments
build_a_bear('Sleepy', 2, 'purple', ['pajamas', 'sleeping cap'], 'sleeping in')


# FizzBuzz

# Declare the method 'fizzbuzz' with 3 parameters
def fizzbuzz(num_1, num_2, range)
# Create a ForLoop that repeats once for every number from 1 to the paramaeter 'range',
# the variable 'i' is the number from the range that the cpmputer is on
(1..range).each do |i|
# Create an if/else statement saying if the modulo of 'i' into num_1
# AND the modulo of 'i' into num_2 is equal to 0...
if i % num_1 === 0 && i % num_2 === 0
# ... print this!
puts 'fizzbuzz'
# BUT, if the modulo of 'i' into num_1 is equal to 0, and the modulo of 'i' into num_2 is not...
elsif i % num_1 === 0
# ...print this!
puts 'fizz'
# BUT, if the modulo of 'i' into num_2 is equal to 0, and the modulo of 'i' into num_1 is not...
elsif i % num_2 === 0
# ...print this!
puts 'buzz'
# Othwerwise...
else
# ...print this!
puts i
#end else/if statement
end
#end forloop
end
#end method
end

#Invoke the fizzbuzz method, passing arguments for num_1 (3), num_2 (5), and the range (100)
fizzbuzz(3, 5, 100)
#Invoke the fizzbuzz method, passing arguments for num_1 (5), num_2 (8), and the range (400)
fizzbuzz(5, 8, 400)
101 changes: 88 additions & 13 deletions final_prep/mod_zero_hero.rb
Original file line number Diff line number Diff line change
@@ -1,41 +1,64 @@
# 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 = "Malcolm"
special_ability = "always knows exactly what to say"

# 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 = "I'm #{hero_name}"
catchphrase = "The guy who... uh... #{special_ability}...? I think?"

# Declare two variables - power AND energy - set to integers
power = 8999
energy = 100

# 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 = 8999 * 500
full_energy = 100 + 150

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

# Declare two variables - is_human and identity_concealed - assigned to booleans
is_human = true
identity_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 = ["Not Malcolm", "F*%#ing Bethany", "Saying the Wrong Thing Sr."]
sidekicks = ["Malcolm 2", "Malcolm 7", "Saying the Wrong Thing Jr."]

# 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 += ['Dumb Idiot']
# 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 -= ["Malcolm 2"]
# Print the sidekicks array to terminal to ensure you added a new sidekick

puts sidekicks
# Create a method 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)
puts "The danger level is: #{danger_level}"
if danger_level >= 50
puts bad_excuse
elsif danger_level >= 10
puts save_the_day
elsif danger_level < 10
puts "Meh. Hard pass."
end
end

assess_situation(3, "Aight Imma go.", "That's far too dangerous. I'm not going!")
# Your method 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
Expand All @@ -47,6 +70,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,30 +81,79 @@
# - citiesDestroyed (array)
# - luckyNumbers (array)
# - address (hash with following key/values: number , street , state, zip)

scary_monster = {
name: "Michael",
smell: "Bad (not good)",
weight: 99999,
citiesDestroyed: ["Decorah, Iowa", "Whitefish, Montana", "Hood River, Oregon", "Sitka, Alaska"],
luckyNumbers: ["1", "2", "34"],
address: {
number: "123",
street: "Fake St.",
state: "Montana",
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
attr_accessor :name, :super_power, :age
attr_reader :arch_nemesis, :power_level, :energy_level

def initialize(arch_nemesis, power_level, energy_level)
@arch_nemesis = "The Syntax Error",
@power_level = 100,
@energy_level = 50
end

def say_name
puts name
end
def maximize_energy
@energy_level = 1000
end
def gain_power(item)
@power_level += item
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
malcolm = SuperHero.new("The Syntax Error", 100, 50)
malcolm.name = "Malcolm"
malcolm.say_name
malcolm.maximize_energy
p malcolm.energy_level
malcolm.gain_power(14)
p malcolm.power_level

buttman = SuperHero.new("The Syntax Error", 100, 50)
buttman.name = "Buttman"

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

# The Class and Hash parts stumped me a little bit, especially the static and dynamic values!
# Just a matter of needing more practive, it seems :)

# What parts felt most comfortable to you?

# Everything up until the has section came to me pretty easily!
# I got lightly stumped at the assess_situation method, but I figure it out without google! (Or my notes!)

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

# Hashes and Classes, thats for sure! And maybe speed, I feel as though I work a little slow.
Loading