Final answer:
The girls ate 1/6 of the whole cake.
Step-by-step explanation:
To find out how much of the whole cake the girls ate, we need to calculate the fraction of the cake that was left after Hannah's birthday party. Given that 1/2 of the cake was left over, we can represent this as 1/2.
The girls then ate 2/3 of the leftover cake for a snack. We can represent this as (2/3 * 1/2), which simplifies to 2/6.
To find out how much of the whole cake the girls ate, we can calculate (1/2 - 2/6). This simplifies to (3/6 - 2/6), which equals 1/6.
Therefore, the girls ate 1/6 of the whole cake.