(a) General rule.–A public law enforcement official or a person acting in cooperation with such an official perpetrates an entrapment if for the purpose of obtaining evidence of the commission of an offense, he induces or encourages another person to engage in conduct constituting such offense by either:
(b) Burden of proof.–Except as provided in subsection (c) of this section, a person prosecuted for an offense shall be acquitted if he proves by a preponderance of evidence that his conduct occurred in response to an entrapment.