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
19 changes: 11 additions & 8 deletions final_prep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,29 @@ In Mod 0 you've learned about different techniques for managing your time at Tur
- [ ] Study/Project work time
- [ ] Health + Wellness

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

- <img width="773" alt="Screen Shot 2021-11-13 at 3 22 38 PM" src="https://user-images.githubusercontent.com/93003902/141659467-a38b14ec-e4bb-429f-8fa1-5f0ce31e994b.png">
- <img width="772" alt="Screen Shot 2021-11-13 at 3 22 53 PM" src="https://user-images.githubusercontent.com/93003902/141659471-6352f6fd-db73-4ad5-a0e9-8600d947a5bc.png">
- <img width="771" alt="Screen Shot 2021-11-13 at 3 23 09 PM" src="https://user-images.githubusercontent.com/93003902/141659476-e0f733f2-59eb-4f0a-9fde-29acb790faaf.png">


- `Add Week 1 Screenshot Here`
- `Add Week 2 Screenshot Here`
- `Add Week 3 Screenshot Here`

### 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: https://gist.github.com/Rinplz/0adefd9fc22d59c6d2a226c79857aad4

### 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:https://gist.github.com/Rinplz/efe61964d2a835f10feb3041dfd5fd14n

### 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: https://gist.github.com/Rinplz/32486e7da026187041cedf104d8b7fa6

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

# Build a Bear

#creates method named build_a_bear with arguments name, age, fur, clothes, and special_power
def build_a_bear(name, age, fur, clothes, special_power)
#creates and defines greeting with a string interpolating name
greeting = "Hey partner! My name is #{name} - will you be my friend?!"
#creates and dfines demographics with an array with indexes 0 for name and 1 for age
demographics = [name, age]
#creates and defines power_saying with a string interpolating special_power
power_saying = "Did you know that I can #{special_power}?"
#creates and defines built_bear with a hash including basic_info calling for demographics,
#clothes calling for clothes, exterior calling for fur, clothes calling for clothes
#cost set to a float (crrent 49.99), sayings set to an array of greeting, power_saying,
#and a string, and is_cuddly, set to true
built_bear = {
'basic_info' => demographics,
'clothes' => clothes,
Expand All @@ -16,28 +23,46 @@ def build_a_bear(name, age, fur, clothes, special_power)
'sayings' => [greeting, power_saying, "Goodnight my friend!"],
'is_cuddly' => true,
}
#returns the built_bear hash
return built_bear
end

#calls the build_a_bear method with arguments "Fluffy, 4, brown, an array of
#pants, jorts, and a tanktop, and 'give you nightmares'"
build_a_bear('Fluffy', 4, 'brown', ['pants', 'jorts', 'tanktop'], 'give you nightmares')
#calls the build_a_bear method with arguments "sleepy", 2, purple, an array of
#pajamas and a sleeping cap, and sleeping in
build_a_bear('Sleepy', 2, 'purple', ['pajamas', 'sleeping cap'], 'sleeping in')


# FizzBuzz

#creats a method named fizzbuzz calling for arguements num_1, num_2, and range
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These are called parameters,.Arguments are the values that you actually pass into the method (i.e. on lines 66 and 68). Parameters and arguments are 2 sides of the same coin, so to speak.

def fizzbuzz(num_1, num_2, range)
#begins a loop to run from 1 to the range variable number of times
(1..range).each do |i|
#begins an if statement that's condition checks if the remainder of i/num_1
#is 0 and the remainder of i / num_2 is also 0
if i % num_1 === 0 && i % num_2 === 0
#prints 'fizzbuzz'
puts 'fizzbuzz'
#begins an else if statement that's condition is if the remainder of i/num_1
#is 0
elsif i % num_1 === 0
#prints 'fizz'
puts 'fizz'
#begins an else if statement that's condition is if the remainder of i /
#number is 0
elsif i % num_2 === 0
#prints 'buzz'
puts 'buzz'
else
#prints i
puts i
end
end
end

#calls the fizzbuzz method with arguments 3,5 and 100
fizzbuzz(3, 5, 100)
fizzbuzz(5, 8, 400)
#calls the fizzbuzz method with arguments 5,8, and 400
fizzbuzz(5, 8, 400)
94 changes: 81 additions & 13 deletions final_prep/mod_zero_hero.rb
Original file line number Diff line number Diff line change
@@ -1,40 +1,66 @@
# 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 = 'The Flash'
special_ability = 'Super Speed'

# 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}. I'm the fastest man alive."
catchphrase = "You can't keep up with me. I've got #{special_ability}"

# Declare two variables - power AND energy - set to integers
power = 200
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 = false

# Declare two variables - arch_enemies AND sidekicks
# arch_enemies should be an array of at least 3 different enemy strings
arch_enemies = ['Captain Cold', 'Gorila Grodd', 'Reverse Flash']
# sidekicks should be an array of at least 3 different sidekick strings

sidekicks = ['Kid Flash', 'Impulse', 'Wally West']
# Print the first sidekick to your terminal

p sidekicks.first
# Print the last arch_enemy to the terminal

p arch_enemies.last
# Write some code to add a new arch_enemy to the arch_enemies array
arch_enemies.push('Mirror Master')

# Print the arch_enemies array to terminal to ensure you added a new arch_enemey
p 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
p 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
p bad_excuse
elsif danger_level === (10..50)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If danger_level is 25, this line of code will return false.

You should not be using the === here. This means something totally different than == (which asserts equality).

p save_the_day
else
p "Meh. Hard Pass."
end
end

bad_excuse = "I think I left the oven on at home."
save_the_day = "This'll be over quick."

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

# 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 @@ -55,17 +81,52 @@
# - citiesDestroyed (array)
# - luckyNumbers (array)
# - address (hash with following key/values: number , street , state, zip)
scary_monster = {
name: 'Jawful',
smell: 'shark',
weight: '458',
citiesDestroyed: ['New Jersey, Maine, Miami'],
luckyNumbers: [5, 13, 27],
address: {number: 436, street: 'Lorelaine', state: 'Florida', zip: '32116'}
}


# 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

arch_nemesis = "The Syntax Error"
power_level = 100
energy_level = 50

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

def say_name
p @name
end

def maximize_energy
energy_level = 1000
end

def gain_power(energy_level)
power_level = power_level * energy_level
end

end

# - Create the following class methods
# - say_name, should print the hero's name to the terminal
Expand All @@ -74,11 +135,18 @@

# - Create 2 instances of your SuperHero class

awesome_array = SuperHero.new('Awesome Array', 'teleporting', 28)
mr_float = SuperHero.new('Mr. Float', 'flight', 35)


# Reflection
# What parts were most difficult about this exerise?
#hashes gave me the most trouble


# What parts felt most comfortable to you?
#creating variables, making methods, printing

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

#learning the extensions for manipulating data types like arrays, and
#studying the syntax for hashes and classes
5 changes: 3 additions & 2 deletions section1/exercises/booleans.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
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: 6 additions & 2 deletions section1/exercises/interpolation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@
speedy = "quick red fox"
slow_poke = "lazy brown dog"

p # YOUR CODE HERE
p "The #{speedy} jumped over the #{slow_poke}"

# Write code that uses the variables below to form a string that reads
# "In a predictable result, the tortoise beat the hare!":
slow_poke = "tortoise"
speedy = "hare"

# YOUR CODE HERE
puts "In a predictable result, the #{slow_poke} beat the #{speedy}!"


# YOU DO:
# Declare three variables, name/content/data type of your choice. Think carefully about what you name the variables. Remember, the goal is to be concise but descriptive (it's a hard balance!) Then, log out ONE sentence that incorporates all THREE variables.
lunch = "sandwiches"
number_of_people = 2
number_of_lunches = 2

puts "The lunch today is #{lunch}, and there are #{number_of_people} people here. Good thing we have #{number_of_lunches} #{lunch}."
10 changes: 7 additions & 3 deletions section1/exercises/loops.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@

# Write code that prints the sum of 2 plus 2 seven times:
7.times do
# YOUR CODE HERE
puts 2 + 2
end

# Write code that prints the phrase 'She sells seashells down by the seashore'
# ten times:
# YOUR CODE HERE
10.times do
puts "She sells seashells down by the seashore"
end


# Write code that prints the result of 5 + 7 a total of 9 timees
# YOUR CODE HERE
9.times do
puts 5 + 7
end
8 changes: 4 additions & 4 deletions section1/exercises/numbers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
# `ruby section1/exercises/numbers.rb`

# Example: Write code that prints the result of the sum of 2 and 2:
p 2 + 2
puts 2 + 2

# Write code that prints the result of 7 subtracted from 83:
p #YOUR CODE HERE
puts 83 - 7

# Write code that prints the result of 6 multiplied by 53:
# YOUR CODE HERE
puts 6 * 53

# Write code that prints the result of the modulo of 10 into 54:
# YOUR CODE HERE
puts 54 % 10
9 changes: 5 additions & 4 deletions section1/exercises/strings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
# `ruby section1/exercises/strings.rb`

# Example: Write code that prints your name to the terminal:
p "Alan Turing"
puts "Rin Fabian"

# Write code that prints `Welcome to Turing!` to the terminal:
p #YOUR CODE HERE
puts "Welcome to Turing!"

# Write code that prints `99 bottles of pop on the wall...` to the terminal:
# YOUR CODE HERE
puts "99 bottles of pop on the wall..."

# Write out code to log one line from your favorite song or movie.
# Write out code to log one line from your favorite song or movie.
puts "I'm not your sensei, but I've been saying sense"
Loading