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 12 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
20 changes: 10 additions & 10 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)

### 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,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 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!
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.
2 changes: 1 addition & 1 deletion section1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ This will open the `section1` directory in Atom. You should be able to see the d

1. Next, you will complete several lessons from the Learn Ruby the Hard Way Tutorial. *For ***each*** lesson* ***follow these directions closely***:

1. Create a file within your `section1` directory that will contain this lesson's work. Verify that you are within the directory by using terminal command `pwd`. If you are not, `cd` into your `section1` directory. Once you are there, use the `touch` command in your terminal to create a file. For the first lesson, name this file `ex1.rb`. For each subsequent lesson, use `ex2.rb`, `ex3.rb`, so on, so forth.
1. Create a file within your `section1` directory that will contain this lesson's work. Verify that you are within the directory by using terminal command `pwd`. If you are not, `cd` into your `section1` directory. Once you are there, use the `touch` command in your terminal to create a file. For the first lesson, name this file `ex1.rb`. For each subsequent lesson, use `ex2.rb`, `ex3.rb`, so on, so forth.

1. Work through the lesson, **typing** the code into your file, and running it in the terminal with `ruby ex1.rb`, replacing `ex1` with the actual file name of what you'd like to run. Make sure the output you get is similar to what the lesson shows. If you get an error saying "No such file or directory", be sure to verify the directory you are located in via the terminal- running command `ls` should show the file you are trying to run.

Expand Down
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 the "next" line in this exercise.'
30 changes: 30 additions & 0 deletions section1/ex11.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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} old, #{height} tall and #{weight} heavy."

# 1) gets prompts user input. .chomp blocks the new line (\n) creation when the
#'gets' value is used in a string
# 2)

print "What's your first name? "
first_name = gets.chomp

print "What's your last name? "
last_name = gets.chomp

puts "Your name is #{first_name} #{last_name}."

# 3)

print "What's your favorite color? "
favorite_color = gets.chomp

print "What's your t-shirt size? "
t_shirt_size = gets.chomp

puts "You like to wear #{favorite_color} #{t_shirt_size} t-shirts!"
1 change: 1 addition & 0 deletions section1/ex2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
puts 'Hi # there'
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.0 + 30.0 / 6.0}"
puts "Roosters #{100.0 - 25.0 * 3.0 % 4.0}"

puts "Now I will count the eggs:"

puts 3.0 + 2.0 + 1.0 - 5.0 + 4.0 % 2.0 - 1.0 / 4.0 + 6.0

puts "Is it true that 3.0 + 2.0 < 5.0 - 7.0?"

puts 3.0 + 2.0 < 5.0 - 7.0

puts "What is 3.0 + 2.0? #{3.0 + 2.0}"
puts "What is 5.0 - 7.0? #{5.0 - 7.0}"

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

puts "How about some more."

puts "Is it greater? #{5.0 > -2.0}"
puts "Is it greater or equal? #{5.0 >= -2.0}"
puts "Is it less or equal? #{5.0 <= -2.0}"
Loading