Dependent variable is the variable that changes due to the independent variable, independent variable is the variable that scientists change on purpose.
First find the difference that went by subtracting the 2 numbers:
340 - 306 = 34
divide that by the number of students that went to the first dance:
34 / 340 = 0.1 = 10% decrease