Using arithmetic vector operations

Apply the function sum() to the vector weights.kg.all to calculate the sum of all weights of the 10 study subjects.