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.
This comment is hidden because it contains spoiler information about the solution
As you can see in my post above, I am taking in to considerantion that you can't have 0.whatever population by applying Math.round to my result (I am trying with Math.ceil as well and is not working). Is still not working for me, and, I am taking into consideration that the result should be >= to p. Can somebody help? or point me in the right direction without just giving me a dislike :|
I don't think this will ever get resolved. Some people can't handle fractional people, others can't deal with continious functions. It's the battle of the ages.
@heblopez The error is right there, in the year 1...3 in the output of your solution. Population is the count of a species living in a certain area (in the context of the kata, the species is human). As stated by RileyHunter, you can't count a person partially. For example, let's look at the output of your solution.
1141.4
, there are 1141 and 0.4 people in a certain area. What does the0.4
indicates? You can't just have a person counted as0.4
.Read the post of RileyHunter again, you can't have fractional people.
For the first test case, your solution suggests that after year two there are 1858.75 people in the population - but can you really have three quarters of a person? Think about what data types you're using here and read the description carefully.