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

Zachary Imbriaco #172

Open
wants to merge 47 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5b7c495
Added exercise 1.
Dec 13, 2021
e60eb77
Add second exercise.
Dec 13, 2021
7e38a35
Add exercise 3.
Dec 13, 2021
72cc1ca
Add exercise 4.
Dec 13, 2021
f9983d9
Add exercise 5.
Dec 13, 2021
b0f9047
Add exercise 6.
Dec 13, 2021
901b1c0
Add exercise 7.
Dec 13, 2021
c945dbe
Complete strings.rb.
Dec 13, 2021
37a7d26
Complete numbers.rb.
Dec 13, 2021
e88700b
Complete booleans.rb.
Dec 13, 2021
8d17d3e
Complete variables.rb.
Dec 13, 2021
6168daf
Complete interpolation.rb.
Dec 13, 2021
ed94bb0
Complete loops.rb.
Dec 13, 2021
35be19d
Complete section 1 work.
Dec 13, 2021
cc58a9b
Complete exercise 29.
Dec 14, 2021
d43b28d
Complete exercise 30.
Dec 14, 2021
401db6c
Complete exercise 31.
Dec 14, 2021
673188b
Completed Ruby 100 Conditionals.
Dec 14, 2021
4ec1479
Complete if_statements.rb.
Dec 14, 2021
6aaf18c
Complete first part of reflection.
Dec 14, 2021
a802c59
Complete Launchschool Methods work.
Dec 14, 2021
9addfcc
Complete exercise 18.
Dec 14, 2021
18b8788
Complete exercise 19.
Dec 14, 2021
8f6e083
Complete exercise 21.
Dec 14, 2021
9d596ef
Completed methods.rb.
Dec 14, 2021
8d3b791
Complete section 2.
Dec 14, 2021
59fa21b
Complete exercise 32.
Dec 15, 2021
83bed8e
Complete exercise 34.
Dec 15, 2021
663e74a
Complete exercise 39.
Dec 15, 2021
6f60b9a
Removed superfluous 'city' variable in full association iteration.
Dec 15, 2021
ca0c62e
Complete arrays.rb.
Dec 15, 2021
27a483e
Complete hashes.rb exercise.
Dec 15, 2021
927b925
Complete section 3 technical work.
Dec 15, 2021
39feb6b
Complete launchschool 'What Are Objects' lesson.
Dec 15, 2021
389a576
Complete Launchschool 'Classes Define Objects' lesson.
Dec 15, 2021
5ffc7a5
Completed Launchschool classes + objects 1 lesson.
Dec 15, 2021
6418fcf
Complete RB100 Object exercise.
Dec 15, 2021
07df9a1
Complete burrito.rb.
Dec 15, 2021
cad8e1e
Complete dog.rb.
Dec 15, 2021
350f838
Complete person.rb.
Dec 15, 2021
5b53c69
Complete technical pre-work.
Dec 15, 2021
e934d82
Complete mod_zero_hero.rb.
Dec 16, 2021
94efef5
Complete annotations.rb.
Dec 16, 2021
dc0da5d
Add screenshots of mod 1 calendar.
Dec 16, 2021
eacc557
Add calendar to readme.
Dec 16, 2021
6e21af4
Fix calendar screenshots.
Dec 16, 2021
523f660
Complete mod 1 pre-work.
Dec 16, 2021
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.
Binary file added final_prep/.DS_Store
Binary file not shown.
40 changes: 20 additions & 20 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 Ruby! 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 Ruby! 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)
- [*] Complete the [Mod Zero Hero Challenge](./mod_zero_hero.rb)
- [*] 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
- [*] 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

### 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
- [*] Standard M1 class schedule (see M1 calendar [here](https://backend.turing.io/module1/)
- [*] Study/Project work time
- [*] 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 Calendar](calendar_screenshots/week_1.png "Week 1 Calendar")
- ![Week 2 Calendar](calendar_screenshots/week_2.png "Week 2 Calendar")
- ![Week 3 Calendar](calendar_screenshots/week_3.png "Week 3 Calendar")

### 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:
- [*] Complete the [Mentorship DTR Prep](https://gist.github.com/ericweissman/51965bdcbf42970d43d817818bfaef3c)
- [*] Add link to your gist here: https://gist.github.com/zachary-imbriaco/ab82f4bae21aa6ea80d777c41ad2e3ed

### 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:
- [*] Complete the [Pre Teaching Practice exercise](https://gist.github.com/ericweissman/0036e8fe272c02bd6d4bb14f42fd2f79) gist
- [*] Add a link to your gist here: https://gist.github.com/zachary-imbriaco/f4fd65d4c5369c8f3cb41425deb762c7

### 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:
- [*] Complete the [DTR Guiding Questions](https://gist.github.com/ericweissman/c56f3a98cdce761808c21d498a52f5c6)
- [*] Add a link to your gist here: https://gist.github.com/zachary-imbriaco/e9a350281f38190c57cf5c6b67edef81

## 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
16 changes: 15 additions & 1 deletion final_prep/annotations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,53 @@

# Build a Bear

# Defines a method for declaring variables that lose scope outside of the method call. Probably better as a hash.
def build_a_bear(name, age, fur, clothes, special_power)
# This variable returns a string with the name parameter interpolated within.
greeting = "Hey partner! My name is #{name} - will you be my friend?!"
# This variable returns an array featuring the name and age parameters.
demographics = [name, age]
# This variable returns another string, this time interpolating the special_power parameter.
power_saying = "Did you know that I can #{special_power}?"
# This variable returns a hash featuring the information that you would want your build_a_bear to return, but doesn't proceed to return or store it.
built_bear = {
'basic_info' => demographics,
'clothes' => clothes,
'exterior' => fur,
'cost' => 49.99,
'sayings' => [greeting, power_saying, "Goodnight my friend!"],
# Fixed variable for cuddliness.
'is_cuddly' => true,
}
end

# Test cases.
# These don't actually return anything, since the method doesn't do anything currently.
build_a_bear('Fluffy', 4, 'brown', ['pants', 'jorts', 'tanktop'], 'give you nightmares')
build_a_bear('Sleepy', 2, 'purple', ['pajamas', 'sleeping cap'], 'sleeping in')


# FizzBuzz

# Defines the fizzbuzz method, which counts from 1 up to it's defined range value, and checks each iteration whether i divides evenly into the two provided integers.
def fizzbuzz(num_1, num_2, range)
# sets a loop from 1 to the assigned range.
(1..range).each do |i|
# checks if the current loop divides evenly into BOTH num_1 and num_2.
if i % num_1 === 0 && i % num_2 === 0
puts 'fizzbuzz'
# Checks if the current loop divides into at least num_1 evenly.
elsif i % num_1 === 0
puts 'fizz'
# Checks if the current loop divides into at least num_2 evenly.
elsif i % num_2 === 0
puts 'buzz'
# If it doesn't divide evenly into either parameter, returns the current loop number.
else
puts i
end
end
end

# Test cases.
fizzbuzz(3, 5, 100)
fizzbuzz(5, 8, 400)
Binary file added final_prep/calendar_screenshots/.DS_Store
Binary file not shown.
Binary file added final_prep/calendar_screenshots/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 final_prep/calendar_screenshots/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 final_prep/calendar_screenshots/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.
97 changes: 78 additions & 19 deletions final_prep/mod_zero_hero.rb
Original file line number Diff line number Diff line change
@@ -1,41 +1,59 @@
# 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 = "Deku"
special_ability = "One For All"
# 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, I'm #{hero_name}!"
catchphrase = "#{special_ability}, Full Cowling!"

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

power = 1
energy = 0
# 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
# sidekicks should be an array of at least 3 different sidekick strings

arch_enemies = ["Shigaraki", "Dabi", "Toga"]
sidekicks = ["Ingenium", "Uravity", "Dynamight"]
# Print the first sidekick to your terminal

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

p arch_enemies[-1]
# Write some code to add a new arch_enemy to the arch_enemies array
arch_enemies.push("Hagakure")

# 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 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)
if danger_level > 50
p bad_excuse
elsif danger_level >= 10
p save_the_day
else
p "Meh. Hard pass."
end
end

# 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 @@ -44,9 +62,9 @@
#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.'
# 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) #> 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."

# Declare a new variable - scary_monster - assigned to an hash with the following key/values
# - name (string)
Expand All @@ -56,23 +74,65 @@
# - luckyNumbers (array)
# - address (hash with following key/values: number , street , state, zip)

scary_monster = {
name: "Godzilla",
smell: "Ocean-y",
weight: 2000,
citiesDestroyed: ["Tokyo", "Neo Tokyo", "Neo Neo Tokyo"],
luckyNumbers: [7, 77, 777],
address: {
number: 4096,
street: 'Lorem Ipsum Drive',
state: 'Confusion',
zip: 12321
}
}


# 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(n, s_p, a)
@name = n
@super_power = s_p
@age = a
@arch_nemesis = "The Syntax Error"
@power_level = 100
@energy_level = 50
end

def say_name
p name
end

def maximize_energy
@energy_level = 1000
end

def gain_power(num)
@power_level += num
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
deku = SuperHero.new("Deku", "One For All", 16)
all_might = SuperHero.new("All Might", "One For All", "Old")


# Reflection
Expand All @@ -81,4 +141,3 @@
# What parts felt most comfortable to you?

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

8 changes: 8 additions & 0 deletions section1/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 "This is another line, in a comment!"
9 changes: 9 additions & 0 deletions section1/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."
23 changes: 23 additions & 0 deletions section1/ex3.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
puts "I will now count my chickens:"

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

puts "I will now count the eggs:"

puts 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6

puts "Is it true that 3 + 2 < 5 - 7?"

puts 3 + 2 < 5 - 7

puts "What is 3 + 2? #{3 + 2}"
puts "What is 5 - 7? #{5 - 7}"

puts "Oh, that's why it's false."

puts "How about some more?"

puts "Is it greater? #{5 > -2}"
puts "Is it greater or equal? #{5 >= -2}"
puts "Is it less or equal? #{5 <= -2}"
15 changes: 15 additions & 0 deletions section1/ex4.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cars = 100
space_in_a_car = 4.0
drivers = 30
passengers = 90
cars_not_driven = cars - drivers
cars_driven = drivers
carpool_capacity = cars_driven * space_in_a_car
average_passengers_per_car = passengers / cars_driven

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."
16 changes: 16 additions & 0 deletions section1/ex5.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
my_name = "Zed A. Shaw"
my_age = 35
my_height = 74
my_weight = 180
my_eyes = 'Blue'
my_teeth = 'White'
my_hair = 'Brown'

puts "Let's talk about #{my_name}."
puts "He's #{my_height} inches tall."
puts "He's #{my_weight} pounds heavy."
puts "Actually, that's not too heavy."
puts "He's got #{my_eyes} eyes and #{my_hair} hair."
puts "His teeth are usually #{my_teeth} depending on the coffee."

puts "If I add #{my_age}, #{my_height}, and #{my_weight}, I get #{my_age + my_height + my_weight}."
21 changes: 21 additions & 0 deletions section1/ex6.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
types_of_people = 10
x = "There are #{types_of_people} types of people."
binary = "binary"
do_not = "don't"
y = "Those who understand #{binary} and those who #{do_not}."

puts x
puts y

puts "I said: #{x}."
puts "I also said: #{y}"

hilarious = false
joke_evaluation = "Isn't that joke so funny?! #{hilarious}"

puts joke_evaluation

w = "This is the left side of..."
e = "a string with a right side."

puts w + e
8 changes: 8 additions & 0 deletions section1/ex7.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} years old, #{height} tall and weigh #{weight}."
Loading