Version: 4.2.1 +
In this exercise we will practise working with Table formulas.
- The Futurama Editor must be installed.
- Completing the tutorial Working with Tables first, is recommended.
In this tutorial we will create a DataTable with the age and income of 20 random people.
We want to know the average of the ages and the average of the incomes.
Create a DataTable in a new Futurama document and copy the values below into your DataTable.
- The average age of the 20 people
- The average income of the 20 people
- Create a DataTable type double, with an Index type long. Select the correct number of rows and columns.
- Now select the data from the screen and copy it into the DataTable. (You may use the 'Paste from Excel'-button, but pasting directly (CTRL-V or rightclick with the mouse) will work as well.)
- Use the functions 'Sum' and 'Divide' to calculate the average.
- If you can't copy from screen, the data is also in an excel-file that is added to the solution-zip-file.
- Average age: 39.55
- Average income: 46,663.15
You can download our solution for this assignment by clicking the image at the right. (Futurama 22.214.171.124)
Please note that you can very well have a different solution that is just as good as ours.
If you want some more practice on this subject, you could try the extra exercises below.
We won't provide a solution for these variations, just consider them as a way to further experiment with Futurama.
- (Easy:) Have you calculated the average by dividing the sum by a fixed number 20? Then try to make this solution generic. You can count the number of rows with the formula 'RowCount'.
- (Difficult:) Try to create a formula that returns both averages at once. Therefore you should change the column-entry in your Sum-formula.