Questions and Answers
Problems and Solutions
Quotes help make search much faster. Example: "Practice Makes Perfect"
Tuesday, January 22, 2013
Codecademy Sample Solution: Mixin For the Win
module Languages
FAVE = "Ruby" # This is what you typed before, right? :D
end
class Master
include Languages
def initialize; end
def victory
puts FAVE
end
end
total = Master.new
total.victory
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
This is an example of
scrolling text
using Javascript.
Popular Posts
Codecademy Learn Phaser: Keyboard Events 10/12
//Sample Solution const gameState = {} function preload() { this.load.image('codey', 'https://s3.amazonaws.com/codecademy-...
Physical injury is considered slight if the victim is incapacitated for how long?
Answer: From 1 to 9 days
Array Element Tally
Say you had an election, and you needed to tally the votes for each candidate. All you need to do is enter the name of each candidate o...
Codecademy Sample Solution: Proc Syntax
floats = [1.2, 3.45, 0.91, 7.727, 11.42, 482.911] # Write your code below this line! round_down = Proc.new {|num| num.floor } # Write ...
Codeschool Sample Solution Removing the clicked button
$(document).ready(function(){ $("button").on("click", function(){ var message = $("<span>Call 1-555-...
Codecademy > Learn Java > Classes: Instance Variables Sample Solution
class Dog{ int age; public Dog(){ } public static void main(String[] args) { } }
(no title)
Question: What does a "dead circuit" in Thevenin's and Norton's theorem mean? Answer: A "dead circuit" means...
Codecademy ng-repeat I
//sample solution to MainController.js app.controller('MainController', ['$scope', function($scope) { $scope.title = ...
Math Problems: Minimize the fraction
Problem: The task is to minimize the value of the fraction x/f(x) where x is any 3-digit number and f(x) is its digits sum. What is the 3-d...
FreeCodeCamp Factorialize A Number Sample Solution
function factorialize(num) { var prod = num; if(num === 0){ return 1; } for(var i=num-1; i>0; i--){ prod *= i; ...
No comments:
Post a Comment