From: Robert Klemme Date: 2010-11-03T22:52:27+09:00 Subject: Re: Getting Hash to print and work with numbers On Wed, Nov 3, 2010 at 2:37 PM, Sean Raw wrote: > Hello everyone. Just curious about some code that I was writing. Just > trying to learn anyones input would be very helpful. Can't figure out > how to make this work. > Here it is thank you. > > > Company  = { >  'Emp01'  => { >    'Name' => 'John Smith', >    'Age'  => '55', >    'Payrate' => 5.75, >    'Hours_worked' => 35, >    'Marital_s' => 'S' >    }, >  'Emp02'  => { >    'Name' => 'Jack Smith', >    'Age' => '25', >    'Payrate' => 25.76, >    'Hours_worked' => 60, >    'Marital_s' => 'M' >    }, >  } > p Company['Emp01']['Age'] > a = Company['Emp01']['payrate'] > b = Company['Emp01']['Hours_worked'] > z = a * b > p z A hint: check your spelling. robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/