Double it or lump sum?
Let's refine our problem statement to include an interest calculation: Would you rather earn 4% interest on $15,000 for one month or receive $1 that doubles every day for 15 days?
To help us make the right choice, we will do both calculations. We'll show the results of the doubled amount using a graph, and we'll use a sprite to report the interest amount.
We'll build some user-input features into each calculation so that the user can experiment with variable amounts.
We'll begin by setting up the equation to calculate the doubled amount and its graph.
Double it
The doubling formula is relatively simple. Day two's value is twice as much as day one's. Day three's is twice as much as day two's, and on and on it goes.
We can represent the math with this equation:
newAmount = startAmount x 2
Before you begin, create a new sprite in the shape of a circle. The ellipsis tool in the Paint Editor works well for this. We'll use this sprite to draw the points on our graph, so make it...