Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I have the same problem. Here is the results of calculation
input
p0 -1000, %- 2.0, aug - 50, p - 1214
Output
1070.0
1
1141.4
2
1214.228
3
Calculation (manual)
p % aug
1 year 1 000,00 0,02 1,02 50 1 070,00
2 year 1 070,00 0,02 1,02 50 1 141,40
3 year 1 141,40 0,02 1,02 50 1 214,23
the population cant be a float number this is the mistake.
Regarding the rounding - it worked when I went low but not when I went high. And sometimes a being greater than or equal to b isn't the same as b being less than a. Hope that helps.
Thank you, but I am using right one of that ways :)
Now my trouble is to find right way to compare expressions :)
By now, you used 2 of 3 ways to convert a float number to an integer, the right one is the one you haven't tried.
thanx, I have already understand that I have missed that :)
during debug, I missed that I should compare with 1214 not 1200 🙂
In the description the value is 1200, yes. In the test your code fails, it is 1214.
Sorry but I can't understand where you see the border of 3 or 4 yeras.
Task description shows that population greater or equal to p = 1200 inhabitants!!!
So both numbers: 1213 and 1214 are greater than 1200.
Explain
You can discuss it here, where the author of this kata can see your post. So far you provided no information what or how it's wrong.
Please understand that there really are no errors in tests, as you've been told below this post. The error is in your code.
See the following for more tips: https://docs.codewars.com/training/troubleshooting
That's the difference between 3 years or 4 years, if you can't see that, then I can't help you, keep blaming the tests. Good luck.
1213 or 1214 it does not impact on exercise solution test plan!
issue in the test plan code!
Read the example in the description again, at the 3rd year, you only reach 1213, not 1214.
The problem is in the "Basic Test" block last step, when you press "ATTEMPT" !
See steps below:
1). 1000 * 2 + 50 + 1214
2). 1141 * 2 + 50 + 1214
3). 1214 * 2 + 50 + 1214
1214 - 3
I think, cotrol number should be 3 but in test block exist 4.
In last test it's not 25%, it is 0,25%.
You should everytime divide percent by 100, don't need to check "if (percent >= 1)"
but if I found and error or trouble in test scripts how can I discuss it with platform owner ?
Loading more items...