Punishment for attempting to commit offences
511.—(1)  Subject to subsection (2), whoever attempts to commit an offence punishable by this Code or by any other written law with imprisonment or fine or with a combination of such punishments, or attempts to cause such an offence to be committed, and in such attempt does any act towards the commission of the offence, shall, where no express provision is made by this Code or by such other written law, as the case may be, for the punishment of such attempt, be punished with such punishment as is provided for the offence.
[51/2007]
(2)  The longest term of imprisonment that may be imposed under subsection (1) shall not exceed —
(a)15 years where such attempt is in relation to an offence punishable with imprisonment for life; or
(b)one-half of the longest term provided for the offence in any other case.
[51/2007]
Illustrations
     (a)  A makes an attempt to steal some jewels by breaking open a box, and finds after so opening the box that there is no jewel in it. He has done an act towards the commission of theft, and therefore is guilty under this section.
     (b)  A makes an attempt to pick the pocket of Z by thrusting his hand into Z’s pocket. A fails in the attempt in consequence of Z’s having nothing in his pocket. A is guilty under this section.
[Indian PC 1860, s. 511]