nil.enroll(aetheric_username, quantum_class_id) (adric) wrote,
nil.enroll(aetheric_username, quantum_class_id)
adric

Ruby is against me going

>> @gas_price = 4.00
=> 4.0
>> @atl_bos = 1076
=> 1076
>> @hotel_nights = 6
=> 6
>> @hotel_fee = 60
=> 60
>> @tank_size=14.50
=> 14.5
>> @miles_per_gallon=20
=> 20
>> @roundtrip = 2*@atl_bos
=> 2152
>> @range = @tank_size * @miles_per_gallon
=> 290.0
>> @tank = @tank_size * @gas_price
=> 58.0
>> @tank = @tank_size * @gas_price
=> 58.0
>> @range = @tank_size * @miles_per_gallon
=> 290.0
>> @gas_buys =  @roundtrip / @range
=> 7.42068965517241
>> (@hotel_fee * @hotel_nights) + (@gas_buys * @tank)
=> 790.4

I'm not sure the exact value of @prohibatively_expensive but ..

arie pointed out an error in the math, recalculating:

>> @hotel_nights = 7
=> 7
>> (@hotel_fee * @hotel_nights) + (@gas_buys * @tank)
=> 850.4
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 4 comments