I need help with part b here's all information.

(a) Chlorine gas is added to a glass cylinder of 2.5 cm in radius, fitted with a movable piston. Gas is added until the piston is lifted 5 cm off the bottom of the glass. The pressure on the gas is 1 atm, and the gas and cylinder are at room temperature 25C. How many moles of chlorine were added to the cylinder?
My answer was 0.0040128 moles which is correct.

Part B I need help.
(b) Pressure is applied to the piston, compressing the gas until the piston is 2 cm from the bottom of the cylinder. When the temperature returns to 25C, what is the pressure in the cylinder (in atm)? Assume that chlorine behaves as an ideal gas under these conditions. The molecular weight of chlorine is 70.9 g/mol.

You used PV = nRT to arrive at n for part a.

For part b, recalculate the volume. It is
pi*r^2*h = 3.14*(2.5^2)(5) = ?cc and convert to L.
Then p = nRT/V and solve for p.

In part b when it says compressing the piston 2 cm from the bottom of the cylinder. This value is irrelevant?

No it is relevant. In my response I wrote 5 for h; I should have written 2 for h. If I punched in the numbers right that should be a volume of 39.27 cc or 0.03927 L. Check me out on that. Let me know if you don't get the right answer.

To find the pressure in the cylinder during compression, we can use the ideal gas law equation:

PV = nRT

where P is the pressure, V is the volume, n is the number of moles of gas, R is the ideal gas constant, and T is the temperature in Kelvin.

First, let's calculate the initial volume of the gas before compression. The volume of a cylinder can be calculated using the formula:

V = πr^2h

where r is the radius and h is the height of the gas in the cylinder.

In part (a), we are given that the radius of the cylinder is 2.5 cm and the height of the gas is 5 cm. Converting these values to meters:

r = 2.5 cm = 0.025 m
h = 5 cm = 0.05 m

Plugging these values into the volume formula:

V = π(0.025 m)^2(0.05 m)
= 0.00009817477 m^3

Next, let's calculate the number of moles of chlorine gas in the cylinder. In part (a), you correctly found this to be 0.0040128 moles.

Now, let's convert the temperature from Celsius to Kelvin. The relationship between Celsius and Kelvin is given by:

T(K) = T(°C) + 273.15

Given that the temperature is 25°C, we have:

T = 25°C + 273.15
= 298.15 K

Now we can rearrange the ideal gas law to solve for the final pressure (P) during compression. Rearranging the equation:

P = (nRT) / V

Plugging in the known values:

P = (0.0040128 moles)(0.0821 L·atm/mol·K)(298.15 K) / 0.00009817477 m^3

Note: the ideal gas constant (R) is typically given in units of L·atm/mol·K. Since the volume is given in meters cubed, we also have to convert the volume to liters. There are 1000 liters in a cubic meter, so we divide by 1000 to convert the volume to liters.

Simplifying the equation:

P = (0.0040128)(0.0821)(298.15 / 0.00009817477)
= 0.8255 atm (rounded to four decimal places)

Therefore, the pressure in the cylinder during compression is 0.8255 atm.