Instructions

Students will create a program that turns their robot into a true rover. 

14. Calculating the Mean Average, Part 2

The first block you will need is a block to tell the GoPiGo rover to find the quotient of two numbers​. Use the drop down menu to change the + to ÷.



To find the mean average of a data set, you first find the sum of all of the numbers in the data set. Use a (sum) of list​ block (found under the Math tab​) connected to a variable ​block with the desired list (Temperature)​.

These two blocks together will tell the GoPiGo rover to add up all of the data points in the Temperature list to determine the sum.


The next step in determining the mean average is to divide the sum of the data set by the number of data points. Since we did not count the number of times the GoPiGo rover took temperature readings and the number of readings will vary depending on how long the program runs, we are going to tell the GoPiGo rover to count for us. To do this we will need a length of block​ (under the Lists tab​) connected to a block​ for the desired list (Temperature​).

This means that once the GoPiGo rover has explored and collected data, it will display all of the temperature readings as well as calculate the mean average of the temperature data.