Find the errors in the following
1.)
| class Node | |
| attr_accessor :data, :next | |
| def initialize(data=nil) | |
| @data = data | |
| end | |
| def to_s | |
| data.to_s | |
| end |
| <html> | |
| <head> | |
| <title>Puppies</title> | |
| <link rel="stylesheet" type="text/css" href="puppies.css"> | |
| <script src="puppies.js"></script> | |
| </head> | |
| <body> | |
| <center> | |
| <div class="top"> | |
| <h1>Puppies - wait, is that a puppy?! </h1> |
| Animal = function(name,sound) { | |
| if(name) { | |
| this.name = name; | |
| } | |
| if(sound) { | |
| this.sound = sound; | |
| } | |
| } | |
| Animal.prototype = { |
| @import url(http://fonts.googleapis.com/css?family=Oleo+Script); | |
| @import url(http://fonts.googleapis.com/css?family=Ruluko); | |
| #content { | |
| margin: 0 auto; | |
| text-align: center; | |
| width: 700px; | |
| } | |
| #nav { |
| // Generated by CoffeeScript 1.6.3 | |
| var userName; | |
| var intervalSet = false; | |
| function touchRock() { | |
| if (userName === undefined ) { | |
| userName = prompt("What is your name?"); | |
| alert("It's nice to meet you " + userName); | |
| document.getElementById("rockImg").src = "rock2.jpeg"; | |
| } |
| class Bowling | |
| attr_reader :score | |
| def initialize | |
| @score = 0 | |
| @spare = 0 | |
| @turn = 0 | |
| @strike = 0 | |
| @pins_this_frame = 0 |
| require './bowling' | |
| describe Bowling do | |
| describe '#score' do | |
| let(:game) { Bowling.new } | |
| it 'should start at 0' do | |
| game.score.should == 0 | |
| end |
| # ,o888888o. 8 8888 88 8 8888 8888888888',8888' | |
| # . 8888 `88. 8 8888 88 8 8888 ,8',8888' | |
| # ,8 8888 `8b 8 8888 88 8 8888 ,8',8888' | |
| # 88 8888 `8b 8 8888 88 8 8888 ,8',8888' | |
| # 88 8888 88 8 8888 88 8 8888 ,8',8888' | |
| # 88 8888 `8. 88 8 8888 88 8 8888 ,8',8888' | |
| # 88 8888 `8,8P 8 8888 88 8 8888 ,8',8888' | |
| # `8 8888 ;8P ` 8888 ,8P 8 8888 ,8',8888' | |
| # ` 8888 ,88'8. 8888 ,d8P 8 8888 ,8',8888' |
| # Choose your own adventure: redux | |
| #printing the prompt | |
| #reading input from the console | |
| #return the input | |
| def prompt_and_chomp(prompt) | |
| puts prompt | |
| gets.chomp | |
| end |