First, four bags of 10 pieces, 4x10, is 40 pieces of candy. Then add on the five her dad gave her, 40+5=45, then divide it by six
4x10=40
40+5=45
45/6=7.5
But you cannot give half a piece of candy
so each of her friends get 7 pieces, and she gets 3 pieces