Questions and Answers
Problems and Solutions
Quotes help make search much faster. Example: "Practice Makes Perfect"
Saturday, January 19, 2013
Codecademy Sample Solution: Inheriting a Fortune
class Message
@@messages_sent = 0
def initialize(from, to)
@from = from
@to = to
@@messages_sent += 1
end
end
class Email < Message
def initialize(subject)
@subject = subject
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 Sample Solution: Adding the Parse SDK to your app
<html> <head> <!-- Add the Parse SDK here! --> <script src="http://www.parsecdn.com/js/par...
What hotkeys can you use in a Python shell to repeat the previous command you typed?
Answer: Alt - p p stands for previous. If you keep pressing Alt - p, you will continue cycling back through commands you typed before. I...
Codecademy: "Function and Control Flow"
//sample solution def isEven(x): if(x % 2 == 0): return "yep" else: return "nope"
Codecademy: Codeyear Nesting conditional statements
//sample solution var yourName = "Pam"; var gender = "female"; var result; //Line 10 starts an if statement //Ne...
Codecademy: "Unless"
#sample solution hungry = false unless hungry puts "I'm writing Ruby programs!" else puts "Time to eat!...
Codecademy Sample Solution: Conditional Assignment
favorite_animal ||= "dog" favorite_animal ||= "cat"
Codeschool Sample Solution Selecting Direct Children
$("#tours > li")
Codeschool Sample Solution Click Interaction
$(".book").on("click", function(event){ var message = $("<span>Call 1-555-jquery-air to book this tour...
LearnStreet Sample Solution to Lesson 9 Exercise 3
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] # your code here numbers.collect! do |x| if x % 2...
Codecademy: Structure the Webpage
<!--sample solution--> <html> <head> <title>Week 13 Project</title> </head> ...
No comments:
Post a Comment