Questions and Answers
Problems and Solutions
Quotes help make search much faster. Example: "Practice Makes Perfect"
Sunday, January 20, 2013
Codecademy Sample Solution: Private! Keep Out!
class Dog
def initialize(name, breed)
@name = name
@breed = breed
end
public
def bark
puts "Woof!"
end
private
def id
@id_number = 12345
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: "E-I-E-I-O"
#sample solution pyg = 'ay' original = raw_input('Enter a word:') if len(original) > 0 and original.isalpha(): p...
Compounding: Finding the Present Value of an Annuity
A typical compounding problem would be something like: How much is the equivalent Present Value (P) if an investment pays an amount (A...
Codecademy Sample Solution: Codeyear Anchors Away
<style> p { font-family: sans-serif; font-size:18px;} div#welcome p{ font-family: cursive; font-size: 24px; color: white; b...
Compounding: Finding the Present Value given the Future Value
A typical compounding problem would be something like: What is the present value (P) of a future value (F) if (P) was deposited/lent a...
Codecademy: Instantiate an Object
#sample solution class Triangle(object): #member variables number_of_sides = 3 #methods def __init__(self, angle1, angle2, angle...
Codecademy: String Rotation
// Sample solution // Write a string rotation method. // It should pass all the tests given below. String.prototype.rotate = function(n...
Compounding: Finding the Annuity given its Present Value
A typical compounding problem would be something like: How much will I get annually (A) starting next year if I invest a present value...
Codecademy: Inheritance Syntax
#sample solution class Shape(object): """Makes shapes!""" def __init__(self, number_of_sides): self....
Codecademy Sample Solution: Codeyear What is class to id?
<style> #content p {color: yellow;} p {color: purple;} p {color: green;} </style> <div id="content...
Compounding: Finding the Future Value given the Present Value
A typical compounding problem would be something like: What is the future value (F) of a present value (P) deposited/lent at an intere...
No comments:
Post a Comment