How to the get range of 1 to 10 by index?

63 Views Asked by At

I have a collection of lessons divided by levels Each level has 10 chapters.

level 1 = chapter 1 to 10
level 2 = chapter 11 to 20
level 3 = chapter 21 to 30
and so on..

So my question is, what is the math formula to get the level by only knowing the chapter.

Let's say I want to know the level of chapter 12.

it should be:

level = function(12 ...)

Thank You

1

There are 1 best solutions below

6
On BEST ANSWER

It looks like level$=\lceil \frac {\text{chapter}}{10}\rceil$ works