Difficulty: Low
Title: Investment
Description:
Create an Investment application that calculates how many years it will take for an initial investment to be worth at least x amount of money if compounded annually at 7.5%.
Output:
Initial Investment: 2500
Amount to Earn: 5000
Year 1: $2,687.50
Year 2: $2,889.06
Year 3: $3,105.74
Year 4: $3,338.67
Year 5: $3,589.07
Year 6: $3,858.25
Year 7: $4,147.62
Year 8: $4,458.69
Year 9: $4,793.10
Year 10: $5,152.58
Number of years: 10
Difficulty: Low
Title: Digit Sum
Description:
Create a DigitsSum application that prompts the user for a non-negative integer and then displays the sum of the digits.
Output:
Enter a positive integer: 892
The sum of the digits is: 19
Difficulty: Medium
Title: Prime Number
Description:
A prime number is an integer greater than 1 that is evenly divisible by only 1 and itself. For example 2, 3, 5, and 7 are prime numbers, but 4, 6 , 8, and 9 are not. The secret is modulus!!!
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97
Output:
1. Single Number
2. List all Prime Numbers
Mode: 1
Number: 47
Prime
Difficulty: High
Title: Random Walk
Description:
In the “random walk” problem, a person is placed at the center of a 7 meter long bridge. Each step the person moves 1 meter either forward or backward at random.
| X |
Output:
Example output with just 10 trials (I showed the number of steps per trial to show you the logic for average and maximum number of steps):
Fell off after 8 steps
Fell off after 26 steps
Fell off after 12 steps
Fell off after 4 steps
Fell off after 50 steps
Fell off after 14 steps
Fell off after 4 steps
Fell off after 16 steps
Fell off after 8 steps
Fell off after 30 steps
Average Steps 17
Maximum Steps 50