This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// solution to Codeacademy.com project, "Taxi Fare" | |
// fare based upon miles traveled and the hour of the day | |
var taxiFare = function (milesTraveled, pickupTime) { | |
var baseFare = 2.50; | |
var costPerMile = 2.00; | |
var nightSurcharge = 0.50; // 8pm to 6am, every night | |
var cost = baseFare + (costPerMile * milesTraveled); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Feb, 27th, 2012 | |
# Kevin and Jared at Mad Railers | |
# run with rspec | |
require 'rubygems' | |
require 'rspec' | |
def roman(number) | |
output = "" | |
conversion_table = { |
NewerOlder