Questions and Answers
Problems and Solutions
Quotes help make search much faster. Example: "Practice Makes Perfect"
Wednesday, January 23, 2013
Private Affairs
#Codecademy sample solution
class Account
attr_reader :name
attr_reader :balance
def initialize(name, balance=100)
@name = name
@balance = balance
end
private
def pin
@pin = 1234
end
def pin_error
return "Access denied: incorrect PIN."
end
end
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-...
Codecademy - Animate Your Name: Arrays
//Sample solution to main.js var red = [0, 100, 63]; var orange = [40, 100, 60]; var green = [75, 100, 40]; var blue = [196, 77, 55]; ...
Physical injury is considered slight if the victim is incapacitated for how long?
Answer: From 1 to 9 days
Codecademy Sample Solution: Final Push
$VERBOSE = nil # We'll explain this at the end of the lesson. require 'prime' # This is a module. We'll cover these s...
Codecademy > Learn Java > Classes: Instance Variables Sample Solution
class Dog{ int age; public Dog(){ } public static void main(String[] args) { } }
Codecademy ng-repeat I
//sample solution to MainController.js app.controller('MainController', ['$scope', function($scope) { $scope.title = ...
Codefights isMAC48Address(inputString)
//sample solution function isMAC48Address(inputString) { if(inputString.length!=17){ return false; } var regex = /^([0-9A...
(no title)
Question: What does a "dead circuit" in Thevenin's and Norton's theorem mean? Answer: A "dead circuit" means...
SQL: Table Transformation Lesson 11 Sample Solution
Instructions: Select the items in the category column that are both in the newly acquired new_products table and the legacy_products table....
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...
No comments:
Post a Comment