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

Becky Nisttahuz #157

Open
wants to merge 5 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
40 changes: 22 additions & 18 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,41 @@ 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`
<img width="1122" alt="Screen Shot 2021-11-03 at 1 13 23 PM" src="https://user-images.githubusercontent.com/92293363/140181684-0b07d5a9-b6d8-4d77-bfb2-42f7e52d292a.png"
<img width="1153" alt="Screen Shot 2021-11-03 at 1 13 11 PM" src="https://user-images.githubusercontent.com/92293363/140181696-cefe1946-d8c2-4fb0-9e89-cb54db4fb5a0.png">
<img width="1177" alt="Screen Shot 2021-11-03 at 1 13 00 PM" src="https://user-images.githubusercontent.com/92293363/140181706-e5068877-54b4-4f09-a57b-b13fdb505d83.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:[My Mentee DTR prep](https://gist.github.com/benistta/f03e977c2a12d1d77cdecdeb0e265937)

### 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:[My Pre Teaching Practice exercises](https://gist.github.com/benistta/6aadae3582d8848990939a2e329eae29)

### 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:[My Guiding Questions](https://gist.github.com/benistta/578fee471b980655ca24ed858c5e9715)

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

Choose a reason for hiding this comment

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

AWESOME job with these annotations!


# Build a Bear

# Create a function called build_a_bear that takes 6 arguments: name, age, fur, clothes, special_power
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes! And in Ruby, they'll be referred to as methods!

def build_a_bear(name, age, fur, clothes, special_power)
#greeting should be a string that has the name argument
greeting = "Hey partner! My name is #{name} - will you be my friend?!"
#demographics should an array that has elements: name and age
demographics = [name, age]
#power_saying should be a string that includes the special_power argument
power_saying = "Did you know that I can #{special_power}?"
#built_bearshould be a hash with elements: basic_info, clothes, exterior, cost, sayings, is_cuddly
built_bear = {
'basic_info' => demographics,
'clothes' => clothes,
Expand All @@ -16,28 +20,47 @@ def build_a_bear(name, age, fur, clothes, special_power)
'sayings' => [greeting, power_saying, "Goodnight my friend!"],
'is_cuddly' => true,
}
#return build_bear
return built_bear
#end
end

#test cases:
#build_a_bear('Fluffy', 4, 'brown', ['pants', 'jorts', 'tanktop'], 'give you nightmares')
build_a_bear('Fluffy', 4, 'brown', ['pants', 'jorts', 'tanktop'], 'give you nightmares')
#build_a_bear('Sleepy', 2, 'purple', ['pajamas', 'sleeping cap'], 'sleeping in')
build_a_bear('Sleepy', 2, 'purple', ['pajamas', 'sleeping cap'], 'sleeping in')


# FizzBuzz

#Create a function called fizzbuzz that takes 3 argument: num_1, num_2, range
def fizzbuzz(num_1, num_2, range)
#loop with .each do instead of for loop
(1..range).each do |i|
#Use modulo operator to get the remainder of the division i on num-1
#if i modulo num_1 triple equals 0 AND i modulo num_2 triple equals 0
if i % num_1 === 0 && i % num_2 === 0
#print "fizzbuzz"
puts 'fizzbuzz'
#else if i modulo num_1 triple equals 0
elsif i % num_1 === 0
#print "fizz"
puts 'fizz'
#else if i modulo num_2 triple equals 0
elsif i % num_2 === 0
#print "buzz"
puts 'buzz'
#otherwise
else
#print i
puts i
#end
end
#end
end
#end
end

#test cases
#fizzbuzz(3, 5, 100)
fizzbuzz(3, 5, 100)
fizzbuzz(5, 8, 400)
#fizzbuzz(5, 8, 400)
fizzbuzz(5, 8, 400)
125 changes: 97 additions & 28 deletions final_prep/mod_zero_hero.rb
Original file line number Diff line number Diff line change
@@ -1,52 +1,72 @@
# 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 = "Learny"
special_ability = "Instant learning"
# Declare two variables - greeting AND catchphrase
# greeting should be assigned to a string that uses interpolation to include the hero_name
greeting = " Hello I am #{hero_name}!"
# catchphrase should be assigned to a string that uses interpolation to include the special_ability

catchphrase = "#{special_ability} will save the world! "
# Declare two variables - power AND energy - set to integers

power = 100
energy = 90
# Declare two variables - full_power AND full_energy
# full_power should multiply your current power by 500
full_power = power * 500
# full_energy should add 150 to your current energy

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 = ['Dum', 'Idot', 'Lem']
# sidekicks should be an array of at least 3 different sidekick strings

sidekicks = ['Superman', 'Batman', 'Wonderwoman']
# Print the first sidekick to your terminal

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

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

arch_enemies << 'Stoop'
# 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)
danger = 0
announcement = 'I just saved the day!'
excuse = 'I will let Superman have a chance to save the day today.'

#puts "How dangerous is it?"
#danger_measurement = $stdin.gets.chomp.to_i
# 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 danger > 50
puts "'I just saved the day!'"
elsif danger >= 10 && danger <= 50
puts "'I will let Superman have a chance to save the day today.'"
else
puts "Meh. Hard pass."
end
end

#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."
#announcement = 'I just saved the day!'
#excuse = 'I will let Superman have a chance to save the day today.'
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,29 +76,78 @@
# - luckyNumbers (array)
# - address (hash with following key/values: number , street , state, zip)

scary_monster = {
"name" => '',
"smell" => '',
"weight" => 400,
"cities_destroyed" => ['Paris', 'Milan', 'Texas'],
"lucky_numbers" => [1, 2, 3, 4],
"address" => {
"number" => 10,
"street" => 'King',
"state" => 'CO',
"zip" => 80301
}
}


# 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(name, super_power, age, power_level, energy_level)
@name = name
@super_power = super_power
@age = age
@arch_nemesis = arch_nemesis
Copy link
Collaborator

Choose a reason for hiding this comment

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

For lines 111-113, check the directions written up on lines 99 about these needing to be static values and adjust your solution. Let me know if you need help or have questions about that.

@power_level = power_level
@energy_level = energy_level
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

def say_name
puts "His name is #{name}"
end

def maximize_energy
@energy_level = 1000
end

def gain_power(number)
@power_level += number
puts "He gained power to #{power_level}"
end
end
# - Create 2 instances of your SuperHero class


learny = SuperHero.new("learny", "Instant learning", 50, 10, 20)
p learny.name
p learny.super_power
p learny.age
p learny.power_level
p learny.energy_level
learny.say_name
learny.maximize_energy
learny.gain_power(10)
p learny.name
p learny.super_power
p learny.age
p learny.power_level
p learny.energy_level
# Reflection
# What parts were most difficult about this exerise?

#Remembering all the technical words and syntax was very difficult.
Copy link
Collaborator

Choose a reason for hiding this comment

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

IT IS! Time and practice will get you there!

# What parts felt most comfortable to you?

#The firsdt part of the exercise was the most easiest to me.
# What skills do you need to continue to practice before starting Mod 1?

#I need to practice, practice and practice! I defenitly need to get more comfortable qith the wording and understanding the meaning of each line of pseudocode.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your annotations looked solid, which makes me believe you do have a good technical understanding. That's awesome! So keep focusing on the technical vocabulary you read and use. More practice will help, and when you are completely immersed in Mod 1, you'll have LOTS of practice :)

26 changes: 26 additions & 0 deletions section1/calculations_ex3.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#Print sentence 'I will now calculate Felipe's pay:'
puts "I will now calculate Felipe's sales:"
#Print the calculation in curly brackets
puts "Felipe's sales on weekdays for a month #{30 + 20 - 3 % 5 / 4}"
#Print the result of the calculation in curly brackets
puts "Felipe's sales on weekends for a month #{3 + 76 / 7}"
#Print sentence 'Now let's count his expenses:'
puts "Now let's count his expenses:"
#Print result of the calculation
puts 4 + 5 + 7 - 8 / 12
#Print question. Boolean
puts "It is true that #{30 + 20 - 3 % 5 / 4} + #{3 + 76 / 7} > #{ 4 + 5 + 7 - 8 / 12}?"
#Calculate and print the boolean answer. Either true or false
puts (30 + 20 - 3 % 5 / 4) + (3 + 76 / 7) > 4+ 5 + 7 - 8 / 12
#Print question and answer for the calculation in curly brackets
puts "What is 50 + 13? #{50 + 13}"
#Print question and answer for the calculation in curly brackets
puts "What is 4 + 5 + 7 - 8 / 12? #{4 + 5 + 7 - 8 / 12}"
#Print sentence 'Oh, now I understand.'
puts "Oh, now I understand."
#Print boolean question and answer for the calculation in curly brackets in boolean form: true or false
puts "Is it greater? #{50 + 13 > 4 + 5 + 7 - 8 / 12}"
#Print boolean question and answer for the calculation in curly brackets in boolean form: true or false
puts "Is it greater or equal? #{50 + 13 >= 4 + 5 + 7 - 8 / 12}"
#Print boolean question and answer for the calculation in curly brackets in boolean form: true or false
puts "Is it less or equal? #{50 + 13 <= 4 + 5 + 7 - 8 / 12}"
17 changes: 17 additions & 0 deletions section1/ex1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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 "Making my script print another line"
# Making my script print only one of the lines: I use # at the beggining of each line but one
#puts "This is another line. What does putting a # character at the beginning of the line do? It makes it into a comment. It won't print.


#Study drills
#1. # Making my script print only one of the lines: I use # at the beggining of each line but one
#puts "This is another line. #What does putting a # character at the beginning of the line do? It makes it into a comment. It won't print.
#2. I made my script print only one of the lines by using the octothorpecharacter at the beginning of each line
#3. It comments out the line.
18 changes: 18 additions & 0 deletions section1/ex2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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."




#Study Drills
#1. I was right about what the octothorpe character does at the beginning of a line. It makes the line into a comment that won't print.
#2. I reviewed each line going backward.
#3. I fixed a couple of mistakes.
#4. I read out loud what I typed and did not find more errors
Loading