S
Sean Raw
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
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