Let's let \( x \) represent the number of friends who went to play golf. Each friend paid $7, so the total amount contributed by all friends is \( 7x \). Additionally, the group paid $12 to rent a golf cart.
According to the problem, the total cost for the group was $33. We can set up the equation as follows:
\[ 7x + 12 = 33 \]
Now, we will solve for \( x \).
- Subtract 12 from both sides of the equation:
\[ 7x = 33 - 12 \] \[ 7x = 21 \]
- Divide both sides by 7:
\[ x = \frac{21}{7} \] \[ x = 3 \]
Thus, the number of friends who went to play golf is \( \boxed{3} \).