Explanation:
T = 2×pi × sqrt(L/9.8)
now we know the time the swing should take for a complete back and forth cycle : 3 4 seconds.
the only unknown variable is now L (the length of the rope) :
3.4 = 2×pi × sqrt(L/9.8)
3.4/(2pi) = sqrt(L/9.8)
(3.4/(2pi))² = L/9.8
3.4²/(4pi²) = L/9.8
11.56/(4pi²) = L/9.8
2.89/pi² = L/9.8
9.8 × 2.89/pi² = L = 2.869618563... m ≈ 2.9 m