Retired

Saving Challenge (retired)

Description:

This year, you want to save money. And to do this, you want to gradually increase the amount you save each day by 1 pence (1p).

On 1st January, you'll save 1p. On 2nd January, you'll save 2p. This goes right up to £3.65 on the last day of the year (or £3.66 if it's a leap year).

Write a function that calucates the total amount of money you'll save, given a year. It should return the number formatted as pounds (eg. £1050.45).

If the year is not a valid integer, it should return a savings of £0.00.

calucateSavings(2019) // returns number saved formatted as £??.??
calucateSavings('meow') // returns £0.00
Fundamentals

More By Author:

Check out these other kata created by msmichellegar

Stats:

CreatedJan 3, 2019
Warriors Trained8
Total Skips0
Total Code Submissions28
Total Times Completed5
JavaScript Completions5
Total Stars0
% of votes with a positive feedback rating13% of 4
Total "Very Satisfied" Votes0
Total "Somewhat Satisfied" Votes1
Total "Not Satisfied" Votes3
Total Rank Assessments3
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • msmichellegar Avatar
Ad