Skip to content

Instantly share code, notes, and snippets.

View FrankWiebe's full-sized avatar

Frank Wiebe FrankWiebe

View GitHub Profile
@FrankWiebe
FrankWiebe / cat.rb
Created August 18, 2015 13:38
Exercise 24
class Cat
attr_reader :color, :breed
attr_accessor :name
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
end
def feed(food)
puts "Mmmm, " + food + "!"
@FrankWiebe
FrankWiebe / cat.rb
Created August 18, 2015 14:31
Exercise 25
class Pet
attr_reader :color, :breed
attr_accessor :name
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
end
def feed(food)
puts "Mmmm, " + food + "!"
@FrankWiebe
FrankWiebe / program2.rb
Created August 17, 2015 15:43
Exercise 22
if (5+5==10)
puts "this is true"
else
puts "this is false"
end
@FrankWiebe
FrankWiebe / index.html
Created August 17, 2015 15:51
My responsive website
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="css/normalize.css" rel="stylesheet">
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template go here -->
<link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
@FrankWiebe
FrankWiebe / fav_foods.rb
Created August 17, 2015 19:23
Exercise 23
def fav_foods
food_array = []
3.times do
puts "Name of favorite food."
p food_array << gets.chomp
end
puts "Your favorite foods are #{food_array.join(", ")}."
food_array.each { |food| puts "I like #{food} too!"}
end
fav_foods
@FrankWiebe
FrankWiebe / program.rb
Created August 17, 2015 13:28
Exercise 21
def greeting
puts "Please enter your name:"
name = gets.chomp
puts "Hello" + " " + name
end
greeting
@FrankWiebe
FrankWiebe / index.html
Last active August 29, 2015 14:27
Exercise 20
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="css/normalize.css" rel="stylesheet">
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template go here -->
<link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
@FrankWiebe
FrankWiebe / index.html
Created August 13, 2015 14:18
Exercise 19
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="css/normalize.css" rel="stylesheet">
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template go here -->
<link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
@FrankWiebe
FrankWiebe / index.html
Created August 12, 2015 13:30
Exercise 18
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="css/normalize.css" rel="stylesheet">
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template go here -->
<link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
@FrankWiebe
FrankWiebe / index.html
Created August 11, 2015 16:13
Exercise 17
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="css/normalize.css" rel="stylesheet">
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template go here -->
<link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>