Let us begin with the basic formulae for both Simple and Compound interest:
Simple interest = P*R*T/100
Compound Interest = P*[(R/100)^t]
Now the IS part: The learner enters the 3 variables – Principal, Time and Rate.
Something like this –
Once s/he clicks on the button, both simple and compound interest will be displayed.
Note: I have left the right side blank, on purpose. We may include a little graph to represent the comparison visually. We shall discuss that later.
To do this –
Step 1: Create the following numeric variables in Storyline: ‘principal‘, ‘rate‘, ‘time‘, ‘sinterest‘, ‘cinterest‘
var player = GetPlayer();
var principal = player.GetVar(“principal”)
var rate = player.GetVar(“rate”)
var time = player.GetVar(“time”)
var sinterest = principal*rate*time/100;
//simple interest is put into storyline
var camount = principal*(Math.pow((1+rate/100),time));
//Remember: it would have been difficult to use power function in storyline
var cinterest = camount-principal;
//compound interest is put into storyline
And it is done.
So, we can see how some simple coding can help you build interactivities that involve some complex calculations. Go ahead and try out something different by yourself.