Final answer:
Each friend got 3 cookies.
Step-by-step explanation:
To determine how many cookies each friend got, we can set up an equation.
Let x represent the number of cookies each friend got.
The total number of cookies Johann baked is 24.
Out of the 10 friends he invited, 7 friends were able to attend the picnic.
Therefore, the equation is 7x + 3 = 24.
To solve for x, we can subtract 3 from both sides of the equation:
7x + 3 - 3 = 24 - 3
7x = 21
Next, divide both sides of the equation by 7:
x = 3
Therefore, each friend got 3 cookies.