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
14 changes: 7 additions & 7 deletions final_prep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@ 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`
- `Add Week 2 Screenshot Here`
- `Add Week 3 Screenshot Here`
- <img width="1393" alt="Mod 1 Week 1 Screenshot" src="https://user-images.githubusercontent.com/93055633/141656232-01462d0e-4073-48b7-bb9a-b7d94e9be574.png">
- <img width="1391" alt="Mod 1 Week 2 Screenshot" src="https://user-images.githubusercontent.com/93055633/141656237-5bbfa8c5-7b82-4e0f-a01c-c4a68c416cba.png">
- <img width="1392" alt="Mod 1 Week 3 Screenshot" src="https://user-images.githubusercontent.com/93055633/141656240-71e1afb3-a24e-4852-98a9-d5f3043f011f.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:](https://gist.github.com/SullyBirashk/3bc87a51189e1e2ae6fc6270fc0dd0b4)

### 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/SullyBirashk/a977532978edf59351de975e7ee4ae5f)

### 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/SullyBirashk/28f4e3665c3cca999235a38ab8b9788a)

## 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!
37 changes: 36 additions & 1 deletion final_prep/annotations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,75 @@

# Build a Bear

# Creating a function called build_a_bear with 5 Arguments called name, age, fur,
# clothes, and special_power.

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 38 and 40). Parameters and arguments are 2 sides of the same coin, so to speak.

def build_a_bear(name, age, fur, clothes, special_power)
# Creating a variable called greetings that returns a string interpolation
greeting = "Hey partner! My name is #{name} - will you be my friend?!"
# Creating a variable called demographics that returns an arrray
demographics = [name, age]
# Creating a variable called power_saying that returns a string interpolation
power_saying = "Did you know that I can #{special_power}?"
# Creating a variable called built_bear that returns a Hash
built_bear = {
# first key called basic_info in hash assigned to value called demographics
'basic_info' => demographics,
# second key called clothes in hash assigned to value called clothes
'clothes' => clothes,
# third key called exterior in hash assigned to value called fur
'exterior' => fur,
# fourth key called cost in hash assigned to value 49.99 (Float)
'cost' => 49.99,
# fifth key called sayings in hash assigned to value called (Array)
'sayings' => [greeting, power_saying, "Goodnight my friend!"],
# sixth key called is_cuddly in hash assigned to value true (Boolean)
'is_cuddly' => true,
# This Ends the Hash that was created in line 17
}
# This returns all the values and variables
return built_bear
# This ends the function created on line 9
end

# calling a function with the arguments "fluffy", 4, "brown", Array["pants", "jorts" "tanktop"], "gives you nightmares".
build_a_bear('Fluffy', 4, 'brown', ['pants', 'jorts', 'tanktop'], 'give you nightmares')
# calling a function with the arguments "sleepy", 2, "purple", Array["pajamas", "sleeping cap"], "sleeping in".
build_a_bear('Sleepy', 2, 'purple', ['pajamas', 'sleeping cap'], 'sleeping in')


# FizzBuzz

# Creating a function called fizzbuzz with the arguments num_1, num_2, and range
def fizzbuzz(num_1, num_2, range)
# For each iniger to range do variable
(1..range).each do |i|
# if variable num_1 is 0 and variable num_2 is 0
if i % num_1 === 0 && i % num_2 === 0
# print fizzbuzz
puts 'fizzbuzz'
# or else if variable num_1 is 0
elsif i % num_1 === 0
# print fizz
puts 'fizz'
# or else if variable num_2 is 0
elsif i % num_2 === 0
# print buzz
puts 'buzz'
# if none of these if's or elsif's are true,
else
# print vaiable
puts i
# This end finishes the if statements portion of the function
end
# This end finishes the each do portion of the function
end
# This end finishes the funcition you created
end

# calling function fizzbuzz with arguments of 3, 5, 100
fizzbuzz(3, 5, 100)
fizzbuzz(5, 8, 400)
# calling function fizzbuzz with arguments of 5, 8, 400
fizzbuzz(5, 8, 400)


#
102 changes: 89 additions & 13 deletions final_prep/mod_zero_hero.rb
Original file line number Diff line number Diff line change
@@ -1,45 +1,75 @@
# 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 = "Sully"

special_ability = "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 = "Hello stranger! I am #{hero_name}!"

catchphrase = "I am #{special_ability}!"

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

energy = 7

# Declare two variables - full_power AND full_energy
full_power = 3500

full_energy = 157
# full_power should multiply your current power by 500
# full_energy should add 150 to your current energy

# 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 = ["Professor Slow Poke", "Reverse Flash", "Zoom"]

sidekicks = ["Chewey", "Dwight Schrute", "Pedro Sanchez"]
# 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

# Print the first sidekick to your terminal

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

print arch_enemies[2]
# Write some code to add a new arch_enemy to the arch_enemies array

arch_enemies[3] = "Hank"
# 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.delete("Chewey")
# Print the sidekicks array to terminal to ensure you added a new sidekick

print 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
end

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

Choose a reason for hiding this comment

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

What if danger_level == 50 ?

puts save_the_day
elsif danger_level < 10
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
# - 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.
# - 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.

#Test Cases
announcement = 'Never fear, the Courageous Curly Bracket is here!'
Expand All @@ -55,17 +85,32 @@
# - citiesDestroyed (array)
# - luckyNumbers (array)
# - address (hash with following key/values: number , street , state, zip)
scary_monstern = {
"name" => "DoomStep" ,
"smell" => "Hot Garbage" ,
"weight" => 487 ,
"cities_destroyed" => ["Tokoyo","Rome","Frace","Italy"] ,
"lucky_numbers" => [7, 3, 8, 0, 2],
"address" => {
"number" => 56095,
"street" => "Agapanthus",
"state" => "California",
"zip" => 92508
}
}




# 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
Expand All @@ -74,11 +119,42 @@

# - Create 2 instances of your SuperHero class

class SuperHero

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

def say_name
print @name
end

def maximize_energy
@energy_level = 1000
puts "Your Maximum Energy Level has hit an all time high at #{@energy_level}!"
end

def gain_power(number)
@power_level += (number)
puts "Your new Power Level is #{@power_level}"
end

end

# Reflection
# What parts were most difficult about this exerise?
"The most difficult part about this exercise was remembering that when I make a hash,
I had to assign the keys as strings and not just normal variables, took me a while to figure out what was wrong with it."

# What parts felt most comfortable to you?
"I was pretty comfortable creating functions and also creating classes, They were pretty straight forward and didn't give me
as many issues with it."

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

"A Skill I require to continue before continuing to Mod 1 would be trying to fix what I am working on by viewing it from
different perspective, or get more practice on how to troubleshoot my own code!"
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.'
7 changes: 7 additions & 0 deletions section1/ex2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# this is my personal comment section.
puts "Hello World!!"
#I could honestly use this section to pseudocode that way it doesn't show
puts "Only this will show"
#not this suff in between
puts "Where are the comments?" #Even in front of codes, it still wont show!
# I could pu you anywhere lol
36 changes: 36 additions & 0 deletions section1/ex3.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#This is a string
puts "I will now count my chickens:"

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

#This is just a string
puts "Now I will count the eggs:"

#This puts a math answer
puts 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6

#This prints a string (# QUESTION:)
puts "Is it true that 3 + 2 < 5 - 7?"

#This is a bolean, becuase it returns as a true or false
puts 3 + 2 < 5 - 7

puts "What is 3 + 2? #{3 + 2}"
#This is a string with an answer
puts "What is 5 - 7? #{5 - 7}"
#This is a string with an answer

#This is just a string.
puts "Oh, That's why it's false."

#This is just a string.
puts "How about some more."
#This uses a bolean becuase it returns ture or false.
puts "Is it greater #{5 > -2}"
#This uses a bolean becuase it returns ture or false.
puts "Is it greater or equal? #{5 >= -2}"
#This uses a bolean becuase it returns ture or false.
puts "Is it less or equal? #{5 <= -2}"
19 changes: 19 additions & 0 deletions section1/ex4.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#These are all assigned variabales.
cars = 100
space_in_a_car = 4
drivers = 30
passengers = 90
#These are variables determined by previous variables.
cars_not_driven = cars - drivers
cars_driven = drivers
carpool_capacity = cars_driven * space_in_a_car
average_passengers_per_car = passengers / cars_driven


#These are strings with variables as answers, rather than doing the math yourslef.
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."
25 changes: 25 additions & 0 deletions section1/ex5.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name = 'Zed A. Shaw'
age = 35 # not a lie in 2009
height = 74 # inches
weight = 180 #lbs
eyes = 'Blue'
teeth = 'White'
hair = 'Brown'

puts "Let's talk about #{name}."
puts "He's #{height} inches tall."
puts "He's #{weight} pounds heavy."
puts "Actually that's not too heavy."
puts "He's got #{eyes} eyes and #{hair} hair."
puts "His teeth are usually #{teeth} depending on the coffee."

# this line is tricky, try to get it exactly right
puts "If I add #{age}, #{height}, and #{weight} I get #{age + height + weight}."

inch = height
height_in_centimeter = inch * 2.54
puts "His height in Centimeters is #{height_in_centimeter} cm."

lbs = weight
weight_in_kilos = lbs * 0.453592
puts "His weight in Kilos is #{weight_in_kilos} KG"
Loading