Step 1: Recall the combined gas law.
For a fixed amount of ideal gas, if the pressure, volume, and temperature all change, we use the combined gas law: \[ \frac{P_1 V_1}{T_1} = \frac{P_2 V_2}{T_2} \] This law comes directly from the ideal gas equation $PV = nRT$, where $nR$ is constant for a fixed amount of gas.
Step 2: List all initial conditions.
Initial pressure: $P_1 = 12\,\text{atm}$, initial volume: $V_1 = 10\,\text{L}$, initial temperature: $T_1 = 27^\circ\text{C} = 300\,\text{K}$ (always convert Celsius to Kelvin by adding 273).
Step 3: List all final conditions.
Final volume: $V_2 = 6\,\text{L}$. The temperature is increased by $30^\circ\text{C}$, so: \[ T_2 = 27 + 30 = 57^\circ\text{C} = 330\,\text{K} \] The final pressure $P_2$ is what we need to find.
Step 4: Rearrange the combined gas law for $P_2$.
\[ P_2 = \frac{P_1 V_1 T_2}{T_1 V_2} \]
Step 5: Substitute and calculate.
\[ P_2 = \frac{12 \times 10 \times 330}{300 \times 6} = \frac{39600}{1800} = 22\,\text{atm} \] The volume decrease raises the pressure, and the temperature increase also raises it, so a final pressure of 22 atm makes physical sense.
Step 6: State the final answer.
The final pressure of the gas is: \[ \boxed{22\,\text{atm}} \]