Complete the code to calculate the sum of the squares of all numbers from 1-10 (inclusive). The sum of squares is the result of squaring each value before adding it to the sum. The sum of squares for the numbers 1-4 would be \(1 * 1 + 2 * 2 + 3 * 3 + 4 * 4 = 30\text{.}\)
The following program calculates the height of an object as it falls from 1000 feet. The program should use a loop to print out the current height, then update the time by one second and calculate a new height. It should stop looping once the object reaches the ground (height 0) and then print out the final number of seconds.
Below is the start of a program to calculate how long it will take to have at least $50,000 if you invest $300 per month at 0.5% interest per month (approximately 6% per year).