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

Saba Bhamidipati #155

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -19,10 +19,10 @@ 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:
Expand All @@ -39,17 +39,17 @@ When you are finished, add screenshots of your calendar so we can provide feedba
### 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/SabaBhamidipati/773b3a67dddd72f83da4be39d0271e8b
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that final note you drafted up at the bottom is PERFECT, will give your a mentor a feel for what you struggle with.

The questions about communication time frames - what it's asking is, if you are super busy (in classes, stressed about a project) and your mentor DMs you, you might not be able to give a thoughtful response in the heat of the moment. If you are having a super busy stressful week, typically they'll appreciate if within 6-12 hours you acknowledge you got it but let them know you can't fully respond, but let them know you can fully respond within another XX hours. I think that usually sounds like a reasonable communication expectation but when Turing gets really busy, that one seems to fall by the wayside and impact relationships/trust.

BTW 🤩I was a 7th grade math teacher too!


### 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/SabaBhamidipati/56f3295a7f097af76ff225c7f57996f8

### 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/SabaBhamidipati/361a169fcab27e45ccee26e74e7eb010

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

# Build a Bear

# create a method with multiple parameters
def build_a_bear(name, age, fur, clothes, special_power)
# interpolation of name in greeting string value
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 that string is being assigned the the variable greeting

greeting = "Hey partner! My name is #{name} - will you be my friend?!"
# variable defined to combine dynamic variables name and age
demographics = [name, age]
# dynamic variable that takes argument passed to it through object instance (not 100% sure bc I don't see a class creation here)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm glad you noted you weren't 100% clear -

The variable special_power holds the value that was passed into the method, up on line 8.

power_saying = "Did you know that I can #{special_power}?"
# hash with keys that are attributes of a built bear, and values taken from combined variables
# along with a nested array that has three speech modes for the bear
built_bear = {
'basic_info' => demographics,
'clothes' => clothes,
Expand All @@ -19,25 +25,36 @@ def build_a_bear(name, age, fur, clothes, special_power)
return built_bear
end

# Two instances of build_a_bear class: Fluffy and Sleepy
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's be careful here - build_a_bear is a method but not a class, so these aren't instances, they are just calls to the method. In a sentence, you might say "on line 29, I am calling the build_a_bear method".

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


# FizzBuzz

# define method with three parameters, two numbers and a max
def fizzbuzz(num_1, num_2, range)
# inclusive range operator, that will iterate through each number
(1..range).each do |i|
# modulo operator divides left number by both num_1 and num_2 and gets a remainder
# of 0, the i is a multiple of both, and it will return FizzBuzz
if i % num_1 === 0 && i % num_2 === 0
puts 'fizzbuzz'
# if the modulo operator finds a 0 remainder for the left number and num1 ONLY,
# return 'fizz'
elsif i % num_1 === 0
puts 'fizz'
# else if the modulo operator finds a 0 remainder for the left number and num2 ONLY,
# return 'buzz'
elsif i % num_2 === 0
puts 'buzz'
# else if modulo operator finds a >0 remainder for both, return i value
else
puts i
end
end
end

# two instances of fizzbuzz(factors 3,5,range 100) and (factors 5,8,range 400)
fizzbuzz(3, 5, 100)
fizzbuzz(5, 8, 400)
fizzbuzz(5, 8, 400)
139 changes: 134 additions & 5 deletions final_prep/mod_zero_hero.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,107 @@

# Declare two variables - hero_name AND special_ability - set to strings

hero_name = "Superman"
special_ability = "super strength"

# puts hero_name
# puts special_ability

# 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, #{hero_name}"
catchphrase = "How is your #{special_ability} today?"

# puts greeting
# puts catchphrase

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

power = 100
energy = 473

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

# puts full_power
# puts full_energy

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

is_human = false
identity_concealed = true

# puts is_human
# puts identity_concealed

# 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 = ['Lex Luthor', 'Brainiac', 'Darkseid', 'Doomsday']
sidekicks = ['Supergirl', 'Lois Lane', 'Superboy']

# print arch_enemies
# puts ''
# print sidekicks

# Print the first sidekick to your terminal
# puts ''
puts sidekicks[0]

# Print the last arch_enemy to the terminal
# puts''
puts arch_enemies[3]

# Write some code to add a new arch_enemy to the arch_enemies array
arch_enemies[4] = 'Bizarro'

# 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
arch_enemies.shift()

# print arch_enemies

# Print the sidekicks array to terminal to ensure you added a new sidekick
sidekicks[3] = 'Batman'
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)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please come back to this and let me know when you've completed it!

Copy link
Collaborator

Choose a reason for hiding this comment

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

SCRATCH THAT, you already did on line 94, my bad.

end

assess_situation(0, "Cashapp please", "This is not a job for me")

# 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.

def assess_situation(danger_level, save_the_day, bad_excuse)
if danger_level > 50
puts bad_excuse
elsif danger_level >= 10 && danger_level <= 50
puts save_the_day
else
puts "Meh. Hard pass."
end
end

assess_situation(5, "Cashapp please", "This is not a job for me")

#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.'
Expand All @@ -56,29 +118,96 @@
# - luckyNumbers (array)
# - address (hash with following key/values: number , street , state, zip)

scary_monster = {

name: "Saba",
smell: "terrible",
weight: 250,
citiesDestroyed: ['Tokyo', 'Osaka', 'Hokkaido'],
luckyNumbers: [4, 15, 22],
address: {number: 580, street: "Lexington Ave", state: "New York", zip: 11002}

}

# 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
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't need the attr_accessor; you'll dig into that more in Mod1

attr_reader :arch_nemesis, :power_level, :energy_level
def initialize(name, super_power, age, arch_nemesis, power_level, energy_level)
@name = name
@super_power = super_power
@age = age
@arch_nemesis = "The Syntax Error"
@power_level = 100
@energy_level = 50
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

class SuperHero
attr_accessor :name, :super_power, :age
attr_reader :arch_nemesis, :power_level, :energy_level
def initialize(name, super_power, age)
@name = name
@super_power = super_power
@age = age
@arch_nemesis = "The Syntax Error"
@power_level = 100
@energy_level = 50
end

def say_name
puts "#{name}"
end

def maximize_energy(level)
puts "energy_level is #{@energy_level*level}"
end

def gain_power(add_power)
new_power = @power_level + add_power
puts "#{new_power}"
end
end


# - Create 2 instances of your SuperHero class

superman = SuperHero.new('Superman', 'Super strength', 47)

superwoman = SuperHero.new('Superwoman', 'Max speed', 40)

# Reflection
Copy link
Collaborator

Choose a reason for hiding this comment

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

YOU GOT THIS!! I love this reflection.

I think these concepts you've pulled out of:

  • Things get complicated and details matter
  • Understanding the concept behind the syntax is essential
  • Time management is everything

ARE SPOT ON! It is a TON of work and what I've seen so far, and this reflection here, really makes me feel like you are on the right track. You can not let up though. You got this.

# What parts were most difficult about this exerise?
# First, I thought I had at least a working understanding of putting together methods,
# hashes, and classes. But the moment they become even slightly complicated, I feel
# like my knowledge base crumbles. It felt incredibly complicated to create a method
# with multiple parameters. Then inserting a conditional therein was also challenging.

# Second, creating a class with static and dynamic values should have been much easier.
# But the moment I tried to initialize them, I realized I was making mistakes. It's incredible
# how important little details are. I realzied that I need to go back and spend a lot of time
# not just practicing these things, but rationalizing the logic behind them, and Then
# learn to make mistakes and fix them. I need to be conversant with hashes, arrays, classes,
# methods, and variations of all of these. It's going to be 70% practice, and 30% deciphering.

# What parts felt most comfortable to you?
# I feel comfortable with conditionals, because they're not very different in Excel.

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

# Time management! And going through ALL the Mod 1 prework, challenging myself to work through
# the exercises, and doing them far more autonomously. You really don't understand your gaps
# until you sit down to do comprehensive exercises that add layers of complexity.