Let's denote the number of friends as \( x \).
The total amount they paid for playing golf can be expressed as:
- Each friend paid $7, so \( 7x \) represents the total amount paid by all friends.
- The cost to rent the golf cart is $12.
The total amount paid by the group is the sum of the amounts paid by the friends and the cost of the golf cart, which is given as $33. Thus, we can set up the equation:
\[ 7x + 12 = 33 \]
Now, we will solve for \( x \):
- Subtract 12 from both sides:
\[ 7x = 33 - 12 \]
\[ 7x = 21 \]
- Divide both sides by 7:
\[ x = \frac{21}{7} \]
\[ x = 3 \]
So, the number of friends who went to play golf is \( \boxed{3} \).