You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "Interest is Interesting" currently does not have a test case for task 4 where the target balance has been met by the balance already. If you target savings is 1000, but your balance is already - say - 1200, I would expect the method to return "0": the target has already been met.
I have seen implementations using a do-while loop, which would return 1 at the very least, whereas a while loop would return 0. Both currently pass as tests.
I would propose to add two test cases: one where the target balance is equal to the balance, and where the target balance is less than the balance. Both of which should return 0. Furthermore, the instructions should probably clarify that this is expected behaviour (as a hint perhaps?)
Happy to create a PR for this, but wanted to check whether this is indeed the desired behaviour first. This particular task does not appear to be present in other tracks that have the interest-is-interesting exercise, so I did not have any comparison material.
The text was updated successfully, but these errors were encountered:
The "Interest is Interesting" currently does not have a test case for task 4 where the target balance has been met by the balance already. If you target savings is 1000, but your balance is already - say - 1200, I would expect the method to return "0": the target has already been met.
I have seen implementations using a do-while loop, which would return
1
at the very least, whereas a while loop would return0
. Both currently pass as tests.I would propose to add two test cases: one where the target balance is equal to the balance, and where the target balance is less than the balance. Both of which should return
0
. Furthermore, the instructions should probably clarify that this is expected behaviour (as a hint perhaps?)Happy to create a PR for this, but wanted to check whether this is indeed the desired behaviour first. This particular task does not appear to be present in other tracks that have the interest-is-interesting exercise, so I did not have any comparison material.
The text was updated successfully, but these errors were encountered: