In case any taxpayer in any tax year, shall give or contribute, and has given or contributed in each of the ten preceding calendar years, ninety per centum or more of his net income in each year to any corporation, or trust, or community chest, fund or foundation, organized and operated exclusively for religious, charitable, scientific, literary, or educational purposes, or for the prevention of cruelty to children or animals, no part of the net earnings of which inures to the benefit of any private shareholder or individual, and no substantial part of the activities of which is carrying on propaganda, or otherwise attempting, to influence legislation, such net income so given or contributed shall not be subject to any tax under the provisions of this act.
72 P.S. § 3402-311