To solve this problem, we need to determine the value of x, which represents the number of classes John has.
We know that John buys 2 packs of index cards for each student.
He has 30 students in each class.
He bought a total of 360 packs.
We can set up the equation as follows:
Number of packs of index cards per student * Number of students * Number of classes = Total number of packs
2 * 30 * x = 360
Let's simplify and solve for x:
60x = 360
To isolate x, we divide both sides of the equation by 60:
60x / 60 = 360 / 60
x = 6
The value of x is 6.
#### 6
The answer is: 6
Below is a math problem. Provide a detailed, step-by-step solution.

### Problem:
John buys 2 packs of index cards for all his students.  He has x classes and 30 students in each class. He bought 360 packs.

### Answer:
