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
16 changes: 8 additions & 8 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`
- `Add Week 1 Screenshot Here`<img width="968" alt="Screen Shot 2021-10-30 at 5 13 47 PM" src="https://user-images.githubusercontent.com/81201783/139560959-37445ae6-a55b-46ce-bfdc-b8248896a6c3.png">

- `Add Week 2 Screenshot Here`<img width="985" alt="Screen Shot 2021-10-30 at 5 14 03 PM" src="https://user-images.githubusercontent.com/81201783/139560963-93f0c268-c50d-48e8-acec-2712d89099ad.png">

- `Add Week 3 Screenshot Here`<img width="970" alt="Screen Shot 2021-10-30 at 5 14 57 PM" src="https://user-images.githubusercontent.com/81201783/139560966-155e82dd-81ee-4f98-8cb9-5ddb1d70134f.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/AliciaWatt/65e82d635819de7bf579655406a3d158)
### 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/AliciaWatt/bc2ee62216c1a86397081c8dbcf11399)

### 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/AliciaWatt/9191a0996df43704865b1fb44f1c9a00)

## 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!
36 changes: 31 additions & 5 deletions final_prep/annotations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,67 @@
# Use the # to create a new comment

# Build a Bear

#define the function or method using def and add agruments
def build_a_bear(name, age, fur, clothes, special_power)
#upack the arguments by defining the variables
greeting = "Hey partner! My name is #{name} - will you be my friend?!"
#this is an array
demographics = [name, age]
#this is a string with an argument in it
power_saying = "Did you know that I can #{special_power}?"
#this is a hash
built_bear = {
#this is a string
'basic_info' => demographics,
#this is also a string
'clothes' => clothes,
#string again
'exterior' => fur,
#integer
'cost' => 49.99,
#string with argumentnts inside
'sayings' => [greeting, power_saying, "Goodnight my friend!"],
#boolean value
'is_cuddly' => true,
}
#this is a return statment
return built_bear
#this ends the function
end

# this is calling the function build_a_bear with values
build_a_bear('Fluffy', 4, 'brown', ['pants', 'jorts', 'tanktop'], 'give you nightmares')
#this is another set of values
build_a_bear('Sleepy', 2, 'purple', ['pajamas', 'sleeping cap'], 'sleeping in')


# FizzBuzz

# defineing the method with lowercase name declaring the arguments
def fizzbuzz(num_1, num_2, range)
#the range operator and the each do is for loops
(1..range).each do |i|
# if i modulus num_1 equals 0 and i modulus num_2 equals 0
if i % num_1 === 0 && i % num_2 === 0
#if true print 'fizzbuzz'
puts 'fizzbuzz'
#elsif gives another step if the first equation is false
elsif i % num_1 === 0
#if true prints fizz
puts 'fizz'
#another option
elsif i % num_2 === 0
#if true prints buzz
puts 'buzz'
#else is the last use in the if - statment
else
#if none of the above are true prints i
puts i
#end if statment
end
#ends .each do
end
#ends the method
end

#calls fizzbuzz method with values 3, 5, 100
fizzbuzz(3, 5, 100)
fizzbuzz(5, 8, 400)
#calls fizzbuzz method with values 5, 8, 400
fizzbuzz(5, 8, 400)
105 changes: 88 additions & 17 deletions final_prep/mod_zero_hero.rb
Original file line number Diff line number Diff line change
@@ -1,46 +1,78 @@
# 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 = "Procrastigal"
special_ablitiy = "time manipulation"
# 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 = "Never fear, #{hero_name} will be here."
catchphrase = "Saving the world eventually with #{special_ablitiy}!"
# Declare two variables - power AND energy - set to integers

power = 60
energy = 80
# 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 = ["Deadliner", "Distracto Dude", "Thanos"]
sidekicks = ["CreativiTia", "Last Minute Lad", "Greg"]

# Print the first sidekick to your terminal

puts sidekicks.first
# Print the last arch_enemy to the terminal

puts arch_enemies.last
# Write some code to add a new arch_enemy to the arch_enemies array
arch_enemies[3] = "TimeSlip"

# Print the arch_enemies array to terminal to ensure you added a new arch_enemey

puts 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

puts 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)
puts danger_level, save_the_day, bad_excuse

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.

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
danger_level < 10
puts "Meh. Hard Pass."
end
end

bad_excuse = "When the threat is too great, I must procrastinate."
save_the_day = "Down to the wire, I'm the best hero to hire."

puts assess_situation(60, save_the_day, bad_excuse)
puts assess_situation(40, save_the_day, bad_excuse)
puts assess_situation(2, save_the_day, bad_excuse)
#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 @@ -55,17 +87,27 @@
# - citiesDestroyed (array)
# - luckyNumbers (array)
# - address (hash with following key/values: number , street , state, zip)

scary_monster = {
"name" => "BoogeyBoo",
"smell" => "Strong",
"weight" => 2000,
"citiesDestroyed" => ['McCordsville', 'Fort Collins', 'Dallas'],
"luckyNumbers" => [10, 4, 85],
"address" => {"number" => 1313, "street" => "Wazee St.", "state" => "CO", "zip" => 80205
}

}
puts scary_monster

# 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 +116,40 @@

# - Create 2 instances of your SuperHero class

class SuperHero

def initialize(name, super_power, age)
@name = name
@super_power = super_power
@age = age
end

def initalize(arch_nemesis, power_level, energy_level)
@ARCH_NEMESIS = "The Syntax Error"

Choose a reason for hiding this comment

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

Make sure you're using lowercase letters here, so @ARCH_NEMESIS should be @arch_nemisis

@POWER_LEVEL = 100
@ENERGY_LEVEL = 50
end

def say_name
puts "The hero's name is #{@name}."
end
def maximize_energy
puts "Energy level increased to #{20 * 50}!"
end
def gain_power
() + POWER_LEVEL
end
end
thor = SuperHero.new("Thor", "Lightning and more", "200lbs")
puts thor.say_name
puts thor.maximize_energy

# Reflection
# What parts were most difficult about this exerise?
# I struggled with class constants and how to define and if - statment in my assess_situation function

# What parts felt most comfortable to you?
#I'm familar with the concpets I am still working on mastering them

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

# I need to continue practice with accessor methods and instance methods.
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.'
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}" # adds 25 and 30 then divides by 6
puts "Roosters #{100 - 25 * 3 % 4}" # Subtracts 25 from 100 the multiplies by 3

puts "Now I will count the eggs:" #string

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

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

puts 3 + 2 < 5 -7 # < returns false

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

puts "Oh that's why it's false." # string

puts "How about some more" # string

puts "Is it greater? #{5 > -2}" #returns true
puts "Is it greater or equal? #{5 >= -2}" #returns true
puts "Is it less or equal? #{5 <= -2}" # returns false
16 changes: 16 additions & 0 deletions section1/ex4.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cars = 100 # defines number of cars
space_in_a_car = 4.0 # defines number people that fit in each car
drivers = 30 # defines number of drivers
passengers = 90 # defines number of passengers
cars_not_driven = cars - drivers #computation for inactive cars
cars_driven = drivers #computation for number of active cars
carpool_capacity = cars_driven * space_in_a_car # computation for space alotment in cars driven
average_passengers_per_car = passengers / cars_driven # computation for finding average number of passengers per car 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."
21 changes: 21 additions & 0 deletions section1/ex5.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name = 'Zed A. Shaw'
age = 35 #not a lie in 2009
height = 74 # inches
weight = 180 # lbs
eyes = 'Blue'
teeth = 'White'
hair = 'Brown'
height_in_cm = height * 2.54
weight_in_km = weight / 2.205

puts "Let's talk about my #{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."

puts "If I add #{age}, #{height}, and #{weight} I get #{age + height + weight}.
"
puts "He's #{height_in_cm} in centimeters."
puts "He's #{weight_in_km} in Kilograms."
23 changes: 23 additions & 0 deletions section1/ex6.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
types_of_people = 10 #declaring var
x = "There are #{types_of_people} types of people." # declaring var
binary = "binary" # declaring var
do_not = "don't" # decalring var
y = "Those who know #{binary} and those who #{do_not}." # string within string

puts x # prints string
puts y # prints string

puts "I said: #{x}." #prints string within string
puts "I also said: '#{y}'." # prints string within string

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

puts joke_evaluation #prints string

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

puts w + e # prints vars to create long string
q = 'is this a string'
puts q
15 changes: 15 additions & 0 deletions section1/ex7.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
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."

print "Whats your sign? "
horoscope = gets.chomp
print "Do you believe in it? "
y_n = gets.chomp

puts "A #{horoscope} would say #{y_n}!"
Loading