Keywords: clear search

## Welcome to the Futurama Support Site

The Futurama Support Site is the website where you can find Futurama and Futurama Vision documentation. If you have any questions about the support pages or if you want to provide us feedback please send us an e-mail.

Index Exercise 1: Average (Easy)

451 documents found.

# Exercise 1: Average (Easy)

Developer
Tutorial

Module: Editor

Version: 4.2.1 +

User: Developer

Difficulty: Easy

Introduction

In this exercise we will practise working with Table formulas.

Prerequisites

- The Futurama Editor must be installed.
- Completing the tutorial Working with Tables first, is recommended.

## Description

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.

## Assignment

Create a DataTable in a new Futurama document and copy the values below into your DataTable.

IndexAgeIncome
1 35 23325
2 44 35612
3 65 58426
4 18 15936
5 52 105894
6 28 21568
7 22 24365
8 26 28912
9 60 46125
10 41 40156
11 38 49213
12 22 15234
13 59 55684
14 62 68254
15 47 56021
16 33 33215
17 25 18534
18 26 22564
19 34 29657
20 54 184568

Now calculate:
1. The average age of the 20 people
2. The average income of the 20 people

## Tips

• 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.

## Solutions

1. Average age: 39.55
2. Average income: 46,663.15

You can download our solution for this assignment by clicking the image at the right. (Futurama 4.2.1.2)
Please note that you can very well have a different solution that is just as good as ours.

## Variations

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.

Updated: 2012-12-28