Let \( x \) be the number of games Ahmadullah's basketball team played last season.
According to the problem, the number of games played this season (21 games) is 12 more than \( \frac{1}{3} \) the number of games played last season. We can set up the equation as follows:
\[ 21 = \frac{1}{3}x + 12 \]
Now, we can solve for \( x \):
- Subtract 12 from both sides:
\[ 21 - 12 = \frac{1}{3}x \]
\[ 9 = \frac{1}{3}x \]
- Multiply both sides by 3 to eliminate the fraction:
\[ 27 = x \]
So, the team played 27 games last season.
Therefore, the answer is 27 games.