diff --git a/02_Variables_Conditionals/starter_code/Sec 6 of rubby book.rb b/02_Variables_Conditionals/starter_code/Sec 6 of rubby book.rb
new file mode 100644
index 0000000..c57ee85
--- /dev/null
+++ b/02_Variables_Conditionals/starter_code/Sec 6 of rubby book.rb
@@ -0,0 +1,21 @@
+puts 'Hello player! Welcome to Marija\'s Magnificant Test of Psychic Abilities game! You will have 3 attempts to guess a number, 1 through 10. What is your name?'
+name = gets.chomp
+puts 'Hello, ' + name.capitalize + '!'
+
+puts 'Let us begin! I am thinking of a number between 1 and 10, please guess what number this is!'
+
+number = (rand(1..10))
+guess = gets.to_i
+attempts = 3
+
+ if guess == number
+ puts 'You are correct, the number is ' + number.to_s + '!'
+ elsif guess < number
+ puts "Wrong, aim higher and please try again!"
+ elsif guess > number
+ puts "Wrong, aim lower and please try again!"
+ end
+end
+
+
+
diff --git a/02_Variables_Conditionals/starter_code/SecNumHW.rb b/02_Variables_Conditionals/starter_code/SecNumHW.rb
new file mode 100644
index 0000000..a687822
--- /dev/null
+++ b/02_Variables_Conditionals/starter_code/SecNumHW.rb
@@ -0,0 +1,29 @@
+# Marija Ringwelski Homework Assignment answers:
+
+puts 'Hello player! Welcome to Marija\'s Magnificant Test of Psychic Abilities game! What is your name?'
+name = gets.chomp.capitalize # .capitalize will make the first letter of the name capitalized.
+puts 'Hello, ' + name + '!'
+puts 'Let us begin! You get 3 guesses. I am thinking of a number between 1 and 10, please guess what number this is!'
+
+number = (rand(1..10)) # rand(1..10) will privide a range between 1 and 10. rand(10) might include zero and we dont want that.
+guess_remainder = 3 # this prompt will allow for the number of attempts the respondent can make.
+
+loop do # this command will allow for repeated actions of the program for guess_remainder number indicated.
+ guess = gets.to_i # .to_1 method will allow for the conversion of the guess into an integer
+ guess_remainder -= 1 # -= 1 will allow the program to subtract by one guess after each response.
+ if guess == number
+ puts 'You are correct, the number is ' + number.to_s + '!'
+ break
+ elsif guess != number and guess_remainder != 0
+ if guess < number
+ puts "Wrong, aim higher and please try again! Number of attempts left: " + guess_remainder.to_s + '.' # .to_s will return a string for guess_remainder.
+ elsif guess > number
+ puts "Wrong, aim lower and please try again! Number of attempts left: " + guess_remainder.to_s + '.' # .to_s will return a string for guess_remainder.
+ end
+ else puts "Sorry, you lost and have zero psychic abilities! The number was " + number.to_s + '.' # .to_s will return a string for guess_remainder.
+ break
+ end
+end
+
+
+
diff --git a/02_Variables_Conditionals/starter_code/SecNumHWv2.rb b/02_Variables_Conditionals/starter_code/SecNumHWv2.rb
new file mode 100644
index 0000000..f07aedb
--- /dev/null
+++ b/02_Variables_Conditionals/starter_code/SecNumHWv2.rb
@@ -0,0 +1,38 @@
+# Marija Ringwelski Homework Assignment answers:
+
+puts 'Hello player! Welcome to Marija\'s Magnificant Test of Psychic Abilities game! What is your name?'
+name = gets.chomp.capitalize # .capitalize will make the first letter of the name capitalized.
+puts 'Hello, ' + name + '!'
+puts 'Let us begin! You get 3 guesses. I am thinking of a number between 1 and 10, please guess what number this is!'
+guess = gets.to_i # .to_1 method will allow for the conversion of the guess into an integer
+
+number = (rand(1..10))
+# number = (rand(1..10)) # rand(1..10) will privide a range between 1 and 10. rand(10) might include zero and we dont want that.
+guess_remainder = 3 # this prompt will allow for the number of attempts the respondent can make.
+
+# this command will allow for repeated actions of the program for guess_remainder number indicated.
+while guess_remainder > 0
+
+ if guess < number
+ # .to_s will return a string for guess_remainder.
+ puts "Wrong, aim higher and please try again! Number of attempts left: " + guess_remainder.to_s + '.'
+ guess = gets.to_i
+ elsif guess > number
+ # .to_s will return a string for guess_remainder.
+ puts "Wrong, aim lower and please try again! Number of attempts left: " + guess_remainder.to_s + '.'
+ guess = gets.to_i
+ end
+ guess_remainder -= 1 # -= 1 will allow the program to subtract by one guess after each response.
+
+end
+
+if guess == number
+ puts 'You are correct, the number is ' + number.to_s + '!'
+
+else
+ # .to_s will return a string for guess_remainder.
+ puts "Sorry, you lost and have zero psychic abilities! The number was " + number.to_s + '.'
+end
+
+
+
diff --git a/02_Variables_Conditionals/starter_code/calc.rb b/02_Variables_Conditionals/starter_code/calc.rb
new file mode 100644
index 0000000..57e9fb8
--- /dev/null
+++ b/02_Variables_Conditionals/starter_code/calc.rb
@@ -0,0 +1,37 @@
+puts 1+2
+puts 3*4
+puts (24*365)
+puts (60*24)*(365*10)
+puts (60*60*24)*(365*30)
+
+my_string = "say my name"
+puts my_string
+puts my_string
+
+name = "Marija Ringwelski"
+puts "My name is " + name + '.'
+var1 = 2
+var2 = '5'
+puts var1.to_s + var2
+puts var1 + var2.to_i
+
+puts 'Hello there, and what\'s your name?'
+name = gets.chomp
+puts 'Your name is ' + name + '? What a lovely name!'
+puts 'Pleased to meet you, ' + name + '. :)'
+
+puts 'Hello there, what\'s your first name?'
+first_name = gets.chomp
+puts 'What is your middle name?'
+middle_name = gets.chomp
+puts 'What is your last name?'
+last_name = gets.chomp
+puts 'Pleased to meet you, ' + first_name + ' ' + middle_name + ' ' + last_name + '!'
+
+
+puts 'What is your fav number?'
+fav_number = gets.chomp.to_i
+bet_number = fav_number + 1
+puts "that is okay, but is not " +bet_number.to_s+ ' bigger and better?'
+
+
diff --git a/02_Variables_Conditionals/starter_code/class 05272014.rb b/02_Variables_Conditionals/starter_code/class 05272014.rb
new file mode 100644
index 0000000..139597f
--- /dev/null
+++ b/02_Variables_Conditionals/starter_code/class 05272014.rb
@@ -0,0 +1,2 @@
+
+
diff --git a/02_Variables_Conditionals/starter_code/code_demo_boolean.rb b/02_Variables_Conditionals/starter_code/code_demo_boolean.rb
index ea3d367..45be6a9 100644
--- a/02_Variables_Conditionals/starter_code/code_demo_boolean.rb
+++ b/02_Variables_Conditionals/starter_code/code_demo_boolean.rb
@@ -2,15 +2,54 @@
#Let the computer do the work for you!
puts "Is 7 greater than 8?"
+if 7 > 8
+ puts true
+ else
+ puts false
+end
puts "Is 8 x 77 greater than 600?"
+if (8 * 77) > 600
+ puts true
+else
+ puts false
+end
+
puts "Is 1 equal to (7 - 6)?"
+if 1 == (7-6)
+ puts true
+else
+ puts false
+end
+
+
puts "Is 77 greater than 50 AND (88 / 3) less than 30?"
+if 77 > 50 and (88/3)<30
+ puts true
+else
+ puts false
+end
+
puts "Is the length of the word 'wheelbarrow' more than 10 characters long?"
+if "wheelbarrow".length > 10
+ puts true
+else
+ puts false
+end
puts "Are the amount of seconds in an hour greater than or equal to 3000?"
+if (60 ==3000) or > 3000
+ puts true
+else
+ puts false
+end
puts "Does the word 'slaughter' include the word laughter?"
+if "slaughter".include? "laughter"
+ puts true
+else
+ puts false
+end
diff --git a/02_Variables_Conditionals/starter_code/ex_teddit_conditionalv2.rb b/02_Variables_Conditionals/starter_code/ex_teddit_conditionalv2.rb
new file mode 100644
index 0000000..795344c
--- /dev/null
+++ b/02_Variables_Conditionals/starter_code/ex_teddit_conditionalv2.rb
@@ -0,0 +1,35 @@
+# Teddit Contionals - Starter Code.
+
+# Let's add a new Teddit feature. Upvotes!
+# Complete the application below.
+# Where you see comments (lines that begin with #) replace it with code so that the program works.
+
+def get_input
+ gets
+end
+
+def calculate_upvotes(story, category)
+ upvotes = 1
+ if story.include? "cats" or category.include? "cats"
+ upvotes.to_i*5
+ elsif story.include? "bacon" or category.include? "bacon"
+ upvotes.to_i*8
+ elsif story.include? "Food" or category.include? "Food"
+ upvotes.to_1*3
+ end
+
+
+# If the Story is about cats multiply the upvotes by 5
+# If the Story is about bacon multiply the upvotes by 8
+# If the Story is about Food it gets 3 times the upvotes.
+ #For example:
+ # "Cats frolic despite tuna shortage" should give you 5 times the upvotes!
+end
+
+puts "Welcome to Teddit! a text based news aggregator. Get today's news tomorrow!"
+puts "Please enter a News story:"
+story = get_input
+puts "Please give it a category:"
+category = get_input
+upvotes = calculate_upvotes(story, category)
+puts "New story added! #{story}, Category: #{category.capitalize}, Current Upvotes: #{upvotes}"
\ No newline at end of file
diff --git a/02_Variables_Conditionals/starter_code/ruby calc.rb b/02_Variables_Conditionals/starter_code/ruby calc.rb
new file mode 100644
index 0000000..f76dd36
--- /dev/null
+++ b/02_Variables_Conditionals/starter_code/ruby calc.rb
@@ -0,0 +1 @@
+puts 1+2
diff --git a/02_Variables_Conditionals/starter_code/test b/02_Variables_Conditionals/starter_code/test
new file mode 100644
index 0000000..e69de29
diff --git a/05_Classes_Objects/starter_code/ex_apartment_objects/Apt_code.rb b/05_Classes_Objects/starter_code/ex_apartment_objects/Apt_code.rb
new file mode 100644
index 0000000..b5890dc
--- /dev/null
+++ b/05_Classes_Objects/starter_code/ex_apartment_objects/Apt_code.rb
@@ -0,0 +1,19 @@
+#This is the apartment code for lab exercise on 06022014
+
+def create_apartment
+ puts "This is a new apartment."
+ puts "What is the apartment number / name?"
+ name = gets.strip
+
+ puts "How many square feet is apartment #{name}?"
+ apt_sqft = gets.to_i
+
+ puts "How many bedrooms does apartment #{name} have?"
+ apt_bedrooms = gets.to_i
+
+ puts "How many bathrooms does apartment #{name} have?"
+ apt_bathrooms = gets.to_i
+
+ Apartment.new(name, apt_sqft, apt_bedrooms, apt_bathrooms)
+end
+
diff --git a/05_Classes_Objects/starter_code/ex_apartment_objects/Bldg_code.rb b/05_Classes_Objects/starter_code/ex_apartment_objects/Bldg_code.rb
new file mode 100644
index 0000000..09a688e
--- /dev/null
+++ b/05_Classes_Objects/starter_code/ex_apartment_objects/Bldg_code.rb
@@ -0,0 +1,12 @@
+#This is the building code for lab exercise on 06022014
+
+def create_building
+ puts "This is a new building."
+ puts "What is the building's name?"
+ building_name = gets.strip
+
+ puts "What is the building's address?"
+ building_address = gets.strip
+
+ Building.new(building_name, building_address)
+end
diff --git a/05_Classes_Objects/starter_code/ex_apartment_objects/Person_code.rb b/05_Classes_Objects/starter_code/ex_apartment_objects/Person_code.rb
new file mode 100644
index 0000000..35a69ee
--- /dev/null
+++ b/05_Classes_Objects/starter_code/ex_apartment_objects/Person_code.rb
@@ -0,0 +1,16 @@
+#This is the renter's code for lab exercise on 06022014
+
+def create_renter
+ puts "There is a new renter"
+ puts "What is the renter's name?"
+ name = gets.strip
+
+ puts "What is the #{name}'s credit score?"
+ credit_score = gets.to_i
+
+ puts "Is #{name} male or female?"
+ gender = gets.strip
+
+ Person.new(name, credit_score, gender)
+end
+
diff --git a/05_Classes_Objects/starter_code/ex_apartment_objects/SecNumObj b/05_Classes_Objects/starter_code/ex_apartment_objects/SecNumObj
new file mode 100644
index 0000000..dcd024f
--- /dev/null
+++ b/05_Classes_Objects/starter_code/ex_apartment_objects/SecNumObj
@@ -0,0 +1,9 @@
+#the object is
+#player object
+#sec num object
+
+random - method used
+
+class - instead of ifs and else, create methods for the check work
+
+user class
\ No newline at end of file
diff --git a/05_Classes_Objects/starter_code/ex_apartment_objects/lib/apartment.rb b/05_Classes_Objects/starter_code/ex_apartment_objects/lib/apartment.rb
index 80f73f0..0eaa858 100644
--- a/05_Classes_Objects/starter_code/ex_apartment_objects/lib/apartment.rb
+++ b/05_Classes_Objects/starter_code/ex_apartment_objects/lib/apartment.rb
@@ -1,4 +1,17 @@
#Apartment class.
class Apartment
+attr_accessor :name, :apt_sqft, :apt_bedrooms, :apt_bathrooms, :renter, :rent
+ def initialize(name, apt_sqft, apt_bedrooms, apt_bathrooms)
+ @name = name
+ @apt_sqft = apt_sqft
+ @apt_bedrooms = apt_bedrooms
+ @apt_bathrooms = apt_bathrooms
+ @renter = nil
+ @rent = nil
+ end
end
+
+# apartment
+
+
\ No newline at end of file
diff --git a/05_Classes_Objects/starter_code/ex_apartment_objects/lib/building.rb b/05_Classes_Objects/starter_code/ex_apartment_objects/lib/building.rb
index 56c3dfb..bc8c7ac 100644
--- a/05_Classes_Objects/starter_code/ex_apartment_objects/lib/building.rb
+++ b/05_Classes_Objects/starter_code/ex_apartment_objects/lib/building.rb
@@ -1,4 +1,10 @@
#Building Class
class Building
+ attr_accessor :building_name, :building_address, :apartments
+ def initialize(building_name, building_address)
+ @building_name = building_name
+ @building_address = building_address
+ @apartments = []
+ end
end
diff --git a/05_Classes_Objects/starter_code/ex_apartment_objects/lib/person.rb b/05_Classes_Objects/starter_code/ex_apartment_objects/lib/person.rb
index b7c1667..765d2c6 100644
--- a/05_Classes_Objects/starter_code/ex_apartment_objects/lib/person.rb
+++ b/05_Classes_Objects/starter_code/ex_apartment_objects/lib/person.rb
@@ -1,4 +1,10 @@
#Person Class.
class Person
+ attr_accessor :name, :credit_score, :gender
+ def initialize(name, credit_score, gender)
+ @name = name
+ @credit_score = credit_score
+ @gender = gender
+ end
end
diff --git a/05_Classes_Objects/starter_code/ex_apartment_objects/main.rb b/05_Classes_Objects/starter_code/ex_apartment_objects/main.rb
index 246352e..f6977f2 100644
--- a/05_Classes_Objects/starter_code/ex_apartment_objects/main.rb
+++ b/05_Classes_Objects/starter_code/ex_apartment_objects/main.rb
@@ -7,9 +7,9 @@
# => We've also provided a png file of the terminal output from the completed version.
# => Hint: Think before you code. Annotate code and comment out sections as you test different sections
-require_relative 'lib/building'
-require_relative 'lib/apartment'
-require_relative 'lib/person'
+require_relative 'lib/building' #create a separate file
+require_relative 'lib/apartment' #create a separate file
+require_relative 'lib/person' #create a separate file
## First, define our methods
diff --git a/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/lib/game.rb b/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/lib/game.rb
index 1a21a56..d58a57a 100644
--- a/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/lib/game.rb
+++ b/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/lib/game.rb
@@ -2,8 +2,47 @@
require 'lib/secret_number'
class Game
-# this class will be complex
-# we need to write logic to initialize a new game, and run the game loop
-# we'll want to write a few separate methods for unique tasks so that our
-# code is structured properly
+def initialize(player, sec_num)
+ @player = player
+ @sec_num = sec_num
end
+
+player = Person.new(name)
+sec_num = SecretNumber.new
+
+game = Game.new(player, secret_number)
+
+end
+
+number = (rand(1..10))
+guess_remainder = 3
+
+while guess_remainder > 0
+
+ if guess < secret_number
+ puts "Wrong, aim higher and please try again! Number of attempts left: " + guess_remainder.to_s + '.'
+ guess = gets.to_i
+
+ elsif guess > secret_number
+
+ puts "Wrong, aim lower and please try again! Number of attempts left: " + guess_remainder.to_s + '.'
+ guess = gets.to_i
+ end
+ guess_remainder -= 1
+
+end
+
+if guess == number
+ puts 'You are correct, the number is ' + number.to_s + '!'
+else
+ puts "Sorry, you lost and have zero psychic abilities! The number was " + number.to_s + '.'
+end
+
+#Game
+# This class holds most of the game logic and should:
+# Welcome players and inform them of the game rules.
+# Initialize the Player class.
+# Initialize the Secret Number class.
+# Prompt the user to choose a number, verify if the user guessed correctly.
+# If the user guesses incorrectly let them know if they were too high or too low.
+# Monitor how many guesses the player has before the game is over.
\ No newline at end of file
diff --git a/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/lib/person.rb b/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/lib/person.rb
index 5cd9b4e..30e8b57 100644
--- a/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/lib/person.rb
+++ b/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/lib/person.rb
@@ -1,3 +1,13 @@
+
class Person
-# this class will likely be simple, and just remember its name
+
+ attr_accessor :name
+
+ def initialize(name)
+ @name = name
+ end
end
+
+
+#Player
+# Should initialize the player's name.
\ No newline at end of file
diff --git a/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/lib/secret_number.rb b/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/lib/secret_number.rb
index 48edd8e..f038e82 100644
--- a/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/lib/secret_number.rb
+++ b/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/lib/secret_number.rb
@@ -1,3 +1,16 @@
class SecretNumber
-# this class will generate our secret number for us
+
+ attr_accessor :sec_num
+
+ def initialize(sec_num)
+ @sec_num = rand(1..10)
+ end
end
+
+
+
+
+# SecretNumber
+# This class should initiate an array of numbers that range between 1 - 10.
+# Use a method from the array class to select a random element from that array. This random number will be the secret number.
+# This way the secret number is also a secret to you.
\ No newline at end of file
diff --git a/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/main.rb b/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/main.rb
index bc9eaa8..dacaa89 100644
--- a/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/main.rb
+++ b/05_Classes_Objects/starter_code/ex_secret_number_objects/secret_number_objects/main.rb
@@ -1,3 +1,15 @@
+
+require_relative 'lib/game'
+require_relative 'lib/person'
+require_relative 'lib/secret_number'
+
+def intro
+ puts 'Hello player! Welcome to Marija\'s Magnificant Test of Psychic Abilities game! What is your name?'
+ name = gets.chomp.capitalize # .capitalize will make the first letter of the name capitalized.
+ puts 'Hello, ' + name + '!'
+ puts 'Let us begin! You get 3 guesses. I am thinking of a number between 1 and 10, please guess what number this is!'
+ guess = gets.to_i
+
###############################################################################
#
# Introduction to Ruby on Rails
diff --git a/06_Sharing_Behavior/Midterm.rb b/06_Sharing_Behavior/Midterm.rb
new file mode 100644
index 0000000..c8d1559
--- /dev/null
+++ b/06_Sharing_Behavior/Midterm.rb
@@ -0,0 +1,38 @@
+require 'rest-client'
+require 'pry'
+require 'json'
+
+puts "How would you like to search?"
+
+puts "1: Title"
+puts "2: Content Type"
+
+choice = gets.chomp.to_i
+
+if choice == 1
+ puts "what is the title?"
+ title = gets.chomp.gsub(" ", "-")
+ response = RestClient.get("https://www.healthcare.gov/#{title}.json")
+ parsed = JSON.load(response)
+ # binding.pry
+ puts parsed
+
+elsif choice == 2
+
+ puts "Select a content_type"
+ content_type = gets.chomp
+ response = RestClient.get("https://www.healthcare.gov/api/#{content_type}.json")
+ parsed = JSON.load(response)
+ # binding.pry
+ puts parsed
+
+else
+ puts "error!"
+end
+
+
+# response = RestClient.get("https://www.healthcare.gov/#{title}.json")
+
+# parsed = JSON.load(response)
+
+# binding.pry
\ No newline at end of file
diff --git a/06_Sharing_Behavior/MidtermV2.rb b/06_Sharing_Behavior/MidtermV2.rb
new file mode 100644
index 0000000..87a617a
--- /dev/null
+++ b/06_Sharing_Behavior/MidtermV2.rb
@@ -0,0 +1,57 @@
+require 'rest-client'
+require 'pry'
+require 'json'
+
+class MyArticle
+
+ attr_accessor :title, :published, :bite
+
+ def initialize (title, published, bite)
+ @title = title
+ @published = published
+ @bite = bite
+ end
+
+ def my_article
+ puts "The article entitled #{title} was published as #{published} with the following destription: "
+ puts "#{bite}"
+ end
+
+end
+
+puts "How would you like to search? You may search by the options below:"
+
+puts "1: Title"
+puts "2: Content Type"
+puts "please enter a numerical value for your choice."
+
+choice = gets.chomp.to_i
+
+while true
+ if choice == 1
+ puts "What is the title name?"
+ title = gets.chomp.gsub(" ", "-")
+ response = RestClient.get("https://www.healthcare.gov/#{title}.json")
+ parsed = JSON.load(response)
+ # binding.pry
+ puts parsed
+
+ elsif choice == 2
+ puts "What is the content type?"
+ content_type = gets.chomp
+ response = RestClient.get("https://www.healthcare.gov/api/#{content_type}.json")
+ parsed = JSON.load(response)
+ # binding.pry
+ puts parsed
+ break
+ else
+ puts "error! Please enter a valid number."
+ end
+end
+
+
+# response = RestClient.get("https://www.healthcare.gov/#{title}.json")
+
+# parsed = JSON.load(response)
+
+# binding.pry
\ No newline at end of file
diff --git a/06_Sharing_Behavior/MidtermV3.rb b/06_Sharing_Behavior/MidtermV3.rb
new file mode 100644
index 0000000..e21c21f
--- /dev/null
+++ b/06_Sharing_Behavior/MidtermV3.rb
@@ -0,0 +1,58 @@
+# Midterm
+
+require 'rest-client'
+require 'pry'
+require 'json'
+
+class Person
+
+ attr_accessor :name
+
+ def initialize(name)
+ @name = name
+ end
+end
+
+def age_check (age)
+ return "That is very old!" if age.to_i >= 30
+ return "That is very young!" if age.to_i <=20
+ return "Cool."
+end
+
+def check_name (name)
+ return "Hello, #{name}! That's a very long name!" if name.length >= 10
+ return "Hello, #{name}!"
+end
+
+puts "What is your name?"
+name = gets.chomp
+
+puts check_name(name)
+puts
+
+puts "What is your age?"
+age = gets.chomp
+
+puts age_check(age.to_i)
+puts
+
+puts "Let us get started! I want to test your reading abilities."
+puts "What is the title of the article? "
+
+title = gets.chomp.gsub(" ", "-")
+response = RestClient.get("https://www.healthcare.gov/#{title}.json")
+parsed = JSON.load(response)
+puts parsed
+
+# I would like to get the code below to work also but I have not been successful.
+
+# puts "Alright, let us begin! Enter a key word in the title of the article please!"
+# input = gets.chomp
+# response = RestClient.get("http://healthcare.gov/#{input}/.json")
+# parsed = JSON.load(response)
+
+# parsed["title"].each do |post|
+# puts post ["title"]
+# end
+
+
diff --git a/06_Sharing_Behavior/Rails.rb b/06_Sharing_Behavior/Rails.rb
new file mode 100644
index 0000000..139597f
--- /dev/null
+++ b/06_Sharing_Behavior/Rails.rb
@@ -0,0 +1,2 @@
+
+
diff --git a/06_Sharing_Behavior/practice.rb b/06_Sharing_Behavior/practice.rb
new file mode 100644
index 0000000..7c8f872
--- /dev/null
+++ b/06_Sharing_Behavior/practice.rb
@@ -0,0 +1,38 @@
+class House
+
+ attr_accessor :bedrooms, :bathrooms, :residents
+
+ def initialize (bedrooms, bathrooms, residents)
+ @bedrooms = bedrooms
+ @bathrooms = bathrooms
+ @residents = residents
+ end
+
+ def rooms_total
+ puts "This house has #{bedrooms} bedrooms and #{bathrooms} bathrooms."
+ end
+
+ def family
+ puts "This house also has #{residents} family members inside!"
+ end
+
+end
+
+H1 = House.new(4, 2, 5)
+puts H1.rooms_total
+puts H1.family
+
+# ________________________
+# require 'pry'
+# require "json"
+# require 'rest-client'
+
+# input = gets.chomp
+# subred = RestClient.get("http://reddit.com/r/#{input}/.json")
+# sub_post = JSON.load(subred)
+
+# sub_post["data"]["children"].each do |post|
+# puts post ["data"]["title"]
+# end
+
+
diff --git a/07_First_Rails_App/starter_code/ex_users.md b/07_First_Rails_App/starter_code/ex_users.md
index 5c372e8..3769b55 100644
--- a/07_First_Rails_App/starter_code/ex_users.md
+++ b/07_First_Rails_App/starter_code/ex_users.md
@@ -1,6 +1,8 @@

+
+
##Scaffold Users
###Time: 30 min
diff --git a/11_Lab_Session/slides/slides_11.md b/11_Lab_Session/slides/slides_11.md
index 3a6648a..227e874 100644
--- a/11_Lab_Session/slides/slides_11.md
+++ b/11_Lab_Session/slides/slides_11.md
@@ -1,40 +1,40 @@
-
-
-#BEWD - Review Lab Session
-
-###Instructor Name
-
----
-
-
-##Agenda
+
+
+#BEWD - Review Lab Session
+
+###Instructor Name
+
+---
+
+
+##Agenda
* Review
* Lab Time
----
-
-
+---
+
+
##Review
###Request-response

-
----
-
-
+---
+
+
+
##Review
###Routes, Views, Controllers and Forms
Instructors, you know your class best. What do your students need to review?
-
+
---
-
+
##Lab Time
####Ritly
@@ -42,13 +42,13 @@ Instructors, you know your class best. What do your students need to review?
####Rewsly
45 min
-
+
---
-
-## Homework
+
+## Homework
Complete Rewsly
-
+
---
-
+
diff --git a/12_Authentication/slides/slides_12.md b/12_Authentication/slides/slides_12.md
index 59fe4cf..059c9b8 100644
--- a/12_Authentication/slides/slides_12.md
+++ b/12_Authentication/slides/slides_12.md
@@ -1,278 +1,278 @@
-
-
-
-https://github.com/plataformatec/devise#getting-started
-
-
-#BEWD - Authentication
-
-###Instructor Name
-
-
----
-
-
-##Agenda
-
-* Review
- * Rewsly Solution
- * Rity Solution (Briefly)
-* Authentication
- * Authentication Explained
- * Devise Gem
-* Lab
- * Authenticated Ritly
-
----
-
-
-##Review
-###Rewsly & Ritly
-
-* Let's review Rewsly solution from last class.
-* Since we're going to work on Ritly, let's review that (briefly) as well.
-
----
-
-
-##Authentication
-
-
-
----
-
-
-##Authentication
-
-* Use of a combination of username and password to validate user identity. (Obvious I know…)
-* Tracking a user's identity on our app through the __session__.
-
----
-
-##Authentication
-###Security
-
-
-
----
-
-##Security
-* Can I view users' passwords in my app?
-
-####NO!
-
----
-
-##Security
-###Storing Passwords
-
-Bad practice to keep passwords in “clear text”
-
-* Passwords can't be stored in plain text in your database.
-If your database is compromised then passwords are compromised as well.
- * Don't use the same password for all sites.
-
----
-
-
-##Security
-###Hashing
-
-Use one way hash
-
-```
-Digest::SHA2.hexdigest("secret")
-# => "e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4"
-```
----
-
-
-##Security
-###Adding Salt
-
-Salt is random data that are used as an additional input to a one-way function that hashes a password.
-
-
-```
-salt = "a761ce3a45d97e41840a788495e85a70d1bb3815"
-password = "secret"
-Digest::SHA2.hexdigest(salt+password)
-# =>"7963ca00e2e48ea80c615d037494de00a0964682"
-```
-
----
-
-
-##Authentication
-###Managing Users
-
-* When the user is authenticated we store the user_id in the __session__.
-
----
-
-
-##Managing Users
-###Session
-
-* Session data commonly includes the browser user’s identity (name, login, shopping cart, etc.).
-
-* To work, the web server must uniquely identify each browser’s particular HTTP requests while the session lasts.
-
-* Commonly, web servers identify browsers by asking them to store a __cookie__.
-
----
-
-##Managing Users
-###Cookie
-
-* Used to store small bits of information (maximum size about 4k).
-* Cookies allow web servers to provide a temporary unique ID to a browser, to enable session management.
- * Browser storage is not secure.
- * Sensitive data (credit card numbers, etc.) should never be set in a cookie
-
----
-
-
-##Authentication
-###Gems
-Creating authentication from scratch is a complex process (see resources for more info). However Developers have created Gems to make authentication "easy".
-
-* __Devise__
-* CanCan
-* Clearance
-* OmniAuth
-* DoorKeeper
-
----
-
-
-##Authentication
-###Devise GEM
-[https://github.com/plataformatec/devise](https://github.com/plataformatec/devise)
-
-* Straight-forward to implement, integrate and customize.
-* Handles complex security, so you don't have to.
-* Provides controller filters and view helpers (more on that in the code along).
-* Recently updated (v3.0.0) with Rails 4 support!
-
-
----
-
-
-
-
-##Rewsly - Adding Devise
-
----
-
-
-##Devise
-###Recap
-
-* Adding Devise Gem to the Gemfile
-
- gem 'devise', '~> 3.0.0'
-
----
-
-
-##Devise
-###Recap
-
-* Using Devise
-
- rails g devise:install # creates all the devise Controllers, views and initializers
- rails g devise user # creates User model (or modifies it if it exists)
- rake db:migrate # Let's Go!
-
-
----
-
-
-##Devise
-###Recap
-
-* View helpers
-
- <%= user_is_logged_in? %>
- <%= current_user %>
-
----
-
-
-##Authentication
-###Recap
-
-* View helpers
-
- <%= user_is_logged_in? %>
- <%= current_user %>
-
----
-
-##Devise
-###Recap
-
-* Blocking Access
-
- class ApplicationController ...
- before_action :authenticate_user!
- end
-
- class HomeController < ApplicationController
- skip_before_action :authenticate_user!
- end
-
----
-
-##Devise
-###Recap
-
-* Changing the default Route names
-
- devise_for :users, :path_names => { sign_in: 'login', sign_out: 'logout' }
-
----
-
-
-
-##Lab Time - Authenticated Ritly
-
----
-
-
-## Homework
-
-Write a list of information/data you want to store about your user.
-
----
-
-
-