Welcome to the Treehouse Community
Looking to learn something new?
Adriana Alvear1,538 Points
question about math.ceil
What is the purpose of using math.ceil if you can have the same result with total/number_of_people?
William Li7,938 Points
math.ceil(x) returns the smallest integer greater or equal to x, it is used to round numbers up to the nearest integer value.
It probably gives the same result because (total/number_of_people) equals to a whole number.
if (total/number_of_people) is a decimal value then math.ceil will round it up to the nearest integer