Whoever attempts to commit any offence punishable under this Act or to cause such an offence to be committed, and in such attempt, does any act towards the commission of the offence, shall be punished with imprisonment of any description provided for the offence, for a term which may extend to one half of the imprisonment for life or, as the case may be, one-half of the longest term of imprisonment provided for that offence or with fine or with both.