This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Shopping List</title> | |
| <link href="css/style.css" rel="stylesheet"> | |
| </head> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 + "!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Cat | |
| attr_reader :color, :breed | |
| attr_accessor :name | |
| def initialize(color, breed) | |
| @color = color | |
| @breed = breed | |
| @hungry = true | |
| end | |
| def feed(food) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def fav_foods | |
| food_array = [] | |
| 3.times do | |
| puts "Name a favorite food." | |
| food_array << gets.chomp | |
| end | |
| puts "Your favorite foods are #{food_array.join(", ")}." | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if 5+5 !=10 | |
| puts "this is true" | |
| else | |
| puts "this is false" | |
| end | |
| def choose | |
| puts "Do you like programming? Yes or no please." | |
| choice = gets.chomp | |
| if (choice.downcase == "yes") | |
| puts "That\'s great!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| my_name = "Yanick" | |
| def greeting | |
| puts "Please enter your name:" | |
| name = gets.chomp | |
| puts "Hello" + " " + name | |
| end | |
| greeting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Shopping List</title> | |
| <link href="css/style.css" rel="stylesheet"> | |
| </head> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function(){ | |
| $('.ryu').mouseenter(function(){ | |
| $('.ryu-still').hide(); | |
| $('.ryu-ready').show(); | |
| $('.ryu-cool').hide(); | |
| $('.ryu-throwing').hide(); | |
| }) | |
| .mouseleave(function() { | |
| $('.ryu-still').show(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Hello World!</title> | |
| <!-- Bootstrap core CSS --> | |
| <!-- <link href="css/bootstrap.css" rel="stylesheet"> --> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Hello World!</title> | |
| <!-- Bootstrap core CSS --> | |
| <!-- <link href="css/bootstrap.css" rel="stylesheet"> --> | |
NewerOlder