
167 So.2d 425 (1964)
Arthur E. GAUTREAU
v.
BOARD OF ELECTRICAL EXAMINERS OF the CITY OF BATON ROUGE and Parish of East Baton Rouge.
No. 6201.
Court of Appeal of Louisiana, First Circuit.
July 1, 1964.
Rehearing Denied September 30, 1964.
*426 R. Gordon Kean, Jr., Parish Attorney, and John V. Parker, Asst. Parish Attorney, Baton Rouge, for appellant.
Tilton & Whalen, by Joshua A. Tilton, Baton Rouge, for appellee.
Before ELLIS, LOTTINGER, HERGET, LANDRY and REID, JJ.
LANDRY, Judge.
Defendant, Board of Electrical Examiners of the City of Baton Rouge and Parish of East Baton Rouge (sometimes hereinafter referred to simply as "the Board"), has taken this appeal from the judgment of the trial court making peremptory an alternative writ of mandamus ordering appellant to approve the application of and issue appellee, Arthur E. Gautreau, a license as an electrical contractor pursuant to the Electrical Code, City of Baton Rouge, Parish of East Baton Rouge, 1962 Edition, (sometimes hereinafter referred to merely as "the Code").
The facts attending the instant litigation are undisputed between the parties and only questions of law are presented as will hereinafter appear.
This present controversy primarily and basically involves a divergence of opinion between the litigants as to the correct interpretation of Section 303 of the Code which prescribes the requirements for licensing electrical contractors in the City of Baton Rouge and the Parish of East *427 Baton Rouge, said cited section reading in full as follows:
"Section 303. Requirements for License. (a) Except as hereinafter provided, before a license shall be granted to any person firm or corporation, such person, firm or corporation shall apply to the Electrical Inspector for a license, and the applicant, if a person, or if a corporation, one of its officers or representatives, or if a firm, one of the members thereof, shall present himself before the Examining Board hereinbefore provided for, at the time and place fixed by said Board. If the Board shall find upon due examination that the applicant presenting himself is of good character and has had at least five (5) years' experience in the occupation or business governed by the license for which he is applying or is a graduate of any Trade School or College of recognized standing, or possesses a satisfactory knowledge of electricity and the natural laws pertaining to and governing same, and the use and function of electrical appliances and devices for electric light, heat or power purposes, and possesses skill and knowledge in all matters pertaining to the class of business governed by the license of which he is applying, said applicant shall be granted such license on giving bond and paying fees as herein provided. As to the length of experience mentioned above, at least two (2) affidavits must be submitted to this effect, and these affidavits must be sworn to by reliable persons who have known the applicant for the five year period.
"(b) The questions of the examination referred to herein shall be strictly in reference to the current edition of the National Electric Code, the provisions of this chapter and other strictly fundamental and elementary questions of theory and wiring diagrams.
"(c) All persons, firms or corporations now engaged in the business of Master Electricians, and so engaged for a period of five (5) years, or having five (5) years experience as journeymen; apprenticeship experience not to be included in the occupation governed by the license for which application is made, having an established place of business, shall be granted a license to engage in that class of business without examination provided the two (2) affidavits called for above are furnished."
The aforesaid requirements for license are imposed by virtue of Section 302 of the Code which states:
"Section 302. License Required. Every person, firm or corporation, before engaging in the business of installing or contracting to install electric conductors, dynamos, motors, materials, electrical apparatus, and electric installations, also before engaging in the business of buildings, construction, assembling, installing, and repairing of electric light fixtures or contracting to build, construct, assemble, install and repair such light fixtures must procure a license to engage in said business in the City of Baton Rouge, Louisiana. * * *"
Plaintiff, Arthur E. Gautreau, (sometimes hereinafter referred to as "Appellee" or "Applicant"), admittedly a person of good character having more than five years experience in the electrical field, contends it is the ministerial duty of the Board to license him as an electrical contractor by virtue of the hereinabove quoted provisions of Section 303 which, according to Applicant, makes it the mandatory duty of the Board to license an applicant who is of good character and (1) has had at least five years experience or (2) is a graduate of a Trade School for electricians or (3) possesses a satisfactory knowledge of electricity.
On the other hand appellant, conceding a degree of ambiguity with respect to Section 303, nevertheless maintains its provisions *428 do not impose upon the Board the mandatory, ministerial duty of issuing a license to an applicant of good character having more than five years experience but rather that such an applicant must take and satisfactorily pass a written examination as provided for by Section 301 of the Code which recites:
"Section 301. Examination of Applicants. (a) In pursuance of the enforcement of this section, it shall be the duty of the Examinining Board to determine the ability and responsibility of applicants for license under this chapter. The Board shall adopt a uniform application blank which shall contain detailed information concerning applicants' general and technical fitness for license. Said blank shall contain also the report of the Examining Board in detail and shall be filed with the Inspector, and he shall, when application is approved by the Board, issue a certificate to the City Treasurer and permits may then be issued and not before.
"(b) Permits may be issued to the individuals, firms or corporations, when the person to be in charge of the work for said individual, firm or corporation shall have passed the examination, and only so long as he or a licensed electrician under this chapter shall remain in charge of electrical work for such individual, firm or corporation."
By virtue of a joint stipulation appearing of record and upon which the factual aspects of this litigation were largely submitted, it appears that Sections 301 and 303 of the Code, 1962 Edition, are identical with certain unchanged (but otherwise numbered sections) of the Code as originally enacted in 1928. It is further stipulated in effect that since its adoption the Code has been interpreted by defendant Board as requiring all applicants (excepting those who are registered electrical engineers) to take a written examination to determine their qualifications for license. The stipulation further recites that since 1928 the Code has been administratively construed to mean that in order to be eligible for the examination prescribed by Section 301, an applicant must either possess five years' experience or be a graduate of a trade school. It is conceded Applicant, who possesses five years experience, took the prescribed written examination under protest, but failed to attain a passing score of 75 and was consequently denied a license. Appellee was advised, however, that he could apply for re-examination six months from the date of his first test.
The controversy presented for resolution must be adjudicated in the light of certain well established principles applicable in view of the circumstances shown.
A writ of mandamus may be directed to a public officer to compel performance of a ministerial duty. LSA-C.C. P. Article 3863. Mandamus will issue only when there is a clear and specific right to be enforced or a duty which ought to be performed. It never issues in doubtful cases. It may be used only to compel performance of a purely ministerial duty. State ex rel. Hutton v. City of Baton Rouge, 217 La. 857, 47 So.2d 665; State ex rel. Loraine, Inc. v. Adjustment Board, 220 La. 708, 57 So.2d 409.
Where a relator does not plead or pray that an ordinance involved in litigation be declared invalid or unconstitutional its legality and constitutionality is presumed. State ex rel. Hutton v. City of Baton Rouge, supra. A mandamus proceeding is not a proper action to attack the constitutionality of a statute or ordinance. State ex rel. Hutton v. City of Baton Rouge, supra, State ex rel. Monk v. Police Jury of Vernon Parish, La.App., 3 So.2d 186.
We shall first dispose of Applicant's contention that the ordinance in question is unconstitutional in that it fails to provide guides for the written examination prescribed by the Board as a prerequisite to licensing an applicant with five years experience *429 in the electrical field, because this contention may be disposed of on purely procedural grounds.
Plaintiff's petition, consisting of four short paragraphs and a concise prayer, merely alleges his application for a license and his compliance with the Code's provisions, particularly Section 303 thereof. Next it is simply recited that notwithstanding his qualifications, his application was denied. Paragraph four and the prayer of Appellee's complaint state in full as follows:

"4.
"The refusal and denial by said Board to approve your petitioner's application for the license to practice his profession is not justified, and further, petitioner avers that the law provides him no relief by ordinary means, and justice and reason require that a writ of mandamus issue herein directing the Board of Electrical Examiners of the City of Baton Rouge and Parish of East Baton Rouge to approve the application by your petitioner for a license to practice his profession as an electrician."
"WHEREFORE, petitioner prays that an order issue herein addressed to the Board of Electrical Examiners of the City of Baton Rouge and Parish of East Baton Rouge, directing the approval of the application submitted by petitioner, Arthur E. Gautreau, for a license to practice his profession as an electrician, or to show cause to the contrary within a certain time after the service of the order to be fixed by the Court.
"Further, for all equitable and general relief as the law and the nature of the case may provide."
Nowhere in the petition or prayer do we find an attack on the legality or validity of the ordinance in question. Quoted paragraph four of appellee's petition supra, in substance merely charges, in the most general terms, the abuse of discretion by defendant Board without specifying the nature of such alleged abuse. By implication and inference the refusal to perform an alleged ministerial duty is averred. Such, however, is not sufficient to raise the unconstitutionality of the ordinance. The learned trial court did not favor us with written reasons for judgment therefore we cannot say whether he considered the ordinance invalid. Had our esteemed colleague below held the act invalid he would under the circumstances shown clearly have contravened the jurisprudence established in State ex rel. Hutton v. City of Baton Rouge, supra, and State ex rel. Monk v. Police Jury of Vernon Parish, supra. We presume therefore the judgment of the trial court was based on the premise the applicable section of the Code imposed the ministerial duty upon defendant Board of licensing an applicant possessing five years experience.
In view of the cited jurisprudence we hold that the issue of alleged unconstitutionality of the Code (because of its reputed failure to prescribe guides for giving the examination prescribed therein) is not before this Court inasmuch as said issue was not specifically plead. We further hold that the sole question before us on this appeal is whether mandamus lies herein because (as contended by appellee) the Code does not require a written examination by an applicant with five years experience therefore it is the mandatory, ministerial duty of the Board to issue applicant a license, or whether, as argued by appellant, said Code (admittedly vague and ambiguous) nevertheless requires such an applicant to satisfactorily pass a written examination as a condition precedent to receipt of an electrical contractor's license.
LSA-R.C.C. Article 18 provides that the universal and most effectual way of determining the true meaning and intent of a dubious or ambiguous law is consideration of its reason and spirit, or the cause which prompted the legislature to enact it.
*430 In construing a statute, the Court's function is to discover and apply the legislative intent as appears in the following language which we cite with approval from Dore v. Tugwell, 228 La. 807, 84 So.2d 199:
"In this situation, the question arises as to the duty of the court in construing the statute. It has been many times said that it is the function of the courts to interpret the laws so as to give them the connotation the lawmaker obviously intended and not to construe them so rigidly as to give them preposterous or odd meanings * * *. The object of the court in construing a statute is to ascertain the legislative intent and, where a literal interpretation would produce absurd consequences, the letter must give way to the spirit of the law in the statute construed so as to produce a reasonable result * * *."
Also apropos the issue at hand is the following language employed in State ex rel. Thompson v. Dept. of City Civil Service, 214 La. 683, 38 So.2d 385:
"Appropriate here is the following found in Re Hibernia Bank & Trust Co., 185 La. 448, 169 So. 464, 472:
"`"In the case of Church of Holy Trinity v. United States, 143 U.S. 457, 12 S.Ct. 511, 36 L.Ed. 226, and glaringly in the case of [Territory of] Hawaii v. Mankichi, 190 U.S. 197, 23 S.Ct. 787, 47 L.Ed. 1016, the Supreme Court of the U. S. laid down with great force and clearness the doctrine that in construing a statute it is the duty of the Court to seek out the intention of the Legislature and to give effect thereto and in the same manner and to the same extent that it construes a will to determine the intention of the testator, or a contract to determine the intention of the parties thereto, and that no matter how broad and comprehensive may be the language employed by the statute, if it was not the intention of the Legislature to cover a particular case by that broad and comprehensive language, that then no effect should be given to it because the Legislature did not so intend. * * * But even if the language of the act is as broad as opponents contend, it is then the duty of the court to restrain its operation within narrower limits than its words import, if the Court is satisfied that their literal meaning would extend the cases which the legislature never intended to include."'
"That doctrine was affirmed in Smith v. Town of Vinton, 209 La. 587, 25 So. 2d 237, 239, in which we further quoted approvingly from Gremillion v. Louisiana Public Service Commission et al., 186 La. 295, 172 So. 163, as follows:
"`"In the construction of statutes absurd results should be avoided, and when the literal construction would produce such a result, the letter of the law must give way to its spirit and the statute should be construed so as produce a reasonable result. * * *"'"
In instances involving the construction of laws the meaning of the statute involved is to be determined by its reason and spirit, and in ascertaining its intent courts are not bound by the niceties of grammatical rules. In this regard the rule is well and tersely set forth in the following excerpt from Edwards v. Daigle, 201 La. 622, 10 So.2d 209:
"In construing this provision of the statute a strict adherence `to the niceties of grammar rules' would compel us to say that in a case like this only one candidate could receive `the greatest number of votes' and therefore the Committee could declare the nomination of only one candidate but we are not held bound to such strict rules. To the contrary, it is our duty to discover, if possible, the intent of the lawmakers *431 and the `true meaning of the law'. * * *"
The meaning and intent of a law is to be determined by consideration of its provisions in their entirety, effect being given to all its provisions consistent with its express terms and conditions as well as the obvious intent to be drawn from the statute as a whole. Inconsistencies and contradictions in a law are to be resolved, where possible, in such a way as will render the statute valid where such resolution may be made consistent with the spirit which prompted its enactment. C. H. F. Finance Company v. Jochum, 241 La. 155, 127 So.2d 534; Wilkinson v. Poag, La.App., 181 So. 27.
It is clearly settled jurisprudence that the foregoing rules of statutory construction are applicable to municipal ordinances. City of New Orleans v. Leeco, Inc., 226 La. 335, 76 So.2d 387; 62 C.J.S. Verbo Municipal Corporations, § 442d, Page 843.
Our careful consideration of the Code discloses that it purports to adopt a comprehensive Electrical Code for the City of Baton Rouge and the Parish of East Baton Rouge detailing therein the precise manner in which electrical works, wiring and mechanisms are to be performed and installed. In addition the Code provides for the granting and revocation of licenses to engage in the occupation of electrical contractor. Provision is also made for the appointment of inspectors whose functions and duties are expressly stated to consist of supervision and inspection of all electrical installations and work to insure compliance with the code's provisions. Finally, penalties are provided for violations of the terms of the code.
The obvious purpose of such a comprehensive Code is protection of the public welfare by insuring that only qualified persons are licensed as electrical contractors. Patently the field of electrical contracting is one coupled with a public interest considering the danger to life, limb and property attending the improper, faulty, defective or inadequate performance of such work. No great amount of imagination is required to foresee the danger to property by fire or the peril to life and limb arising from improperly or defectively installed electrical installations. The unmistakable intent of the ordinance is protection of the public welfare and interest by insuring that only capable, qualified parties are entitled to pursue the inherently dangerous trade of electrical contractor. That the Code so intended is clearly manifest by the hereinabove quoted Section 301(a) which expressly imposes upon the Board the obligation and responsibility of determining the ability and responsibility of applicants for license.
Fundamentally the dispute herein turns upon the meaning of the phrase "and possesses skill and knowledge in all matter pertaining to the class of business governed by the license of which he is applying" contained in Section 303. Appellee maintains said phrase is applicable only in those cases wherein a person applying for a license has neither 5 years experience nor is a graduate of a trade school and must be given an examination to determine his qualifications. Appellee further maintains that the Code plainly provides that when a person has five years experience (as in his case), or is a graduate of a trade school, no examination is required and the license must be issued as a purely ministerial duty of the Board. On the other hand, however, appellant contends the position of appellee has the effect of writing out of the Code the phrase "and possesses skill and knowledge in all matter pertaining to the class of business governed by the license of which he is applying", which requirement pertains to applicants seeking license based on either five years experience or graduation from a trade school. The Board maintains the cited phrase pertains to all applicants save only registered electrical engineers who are admitted to license without examination under the third category *432 "or possesses a satisfactory knowledge of electricity and the natural laws pertaining to and governing same and the use and function of electrical appliances and devices for electric light, heat or power purposes."
The agreed stipulation of facts appearing of record concedes that the Code since its enactment, has been consistently and continuously interpreted as contended by appellant and that a written examination has been required of applicants seeking license based on five years experience. In this regard, the Board's interpretation is founded on the premise that the Board is required to give an examination by that language in Section 303(a) which states that in order to obtain a license it must be shown that the applicant "possesses skill and knowledge in all matters pertaining to the class of business governed by the license of (sic) which he is applying." In support of its position the Board also points to that portion of Section 301(b) which provides in part that permits for individual jobs may be issued to individuals, firms or corporations when the person in charge of the work shall have passed the examination. The Board also relies, in this connection, upon Section 301(c) which in effect provides that an applicant must pay the license fee and comply with all license requirements within six months of receipt of notice of his successful completion of the examination under penalty of voiding the examination and subjecting the applicant to submit to a new examination as if he were making initial application. Finally, the Board bases its position on Section 303 (b) which states the examination referred to shall be predicated upon the current edition of the National Electric Code, the provisions of the City-Parish Code and other fundamental and elementary questions of theory and wiring diagrams. Predicated on the foregoing interpretation which, in turn, is founded on the mentioned codal provisions, the Board invokes the rule of contemporary construction.
The constitutionality of the Code not being an issue in the present case, we believe the following statement of the law of practical contemporaneous construction set forth in 16 C.J.S. Verbo Constitutional Law § 98, page 387, is applicable herein:
16 C.J.S. Constitutional Law § 98, p. 387
"Practical contemporaneous construction. The permissible rule of practical contemporaneous construction of a statute will be given great, but not necessarily conclusive, weight in order to sustain its constitutionality, but only if doubt exists as to the proper construction of the statute or as to the construction or application of the constitutional provision invoked. The rule is without application where the court has no doubt that a statute is unconstitutional."
It is clear beyond doubt the rule of contemporaneous construction has been adopted by the Courts of this state. In State ex rel. Guillot v. Central Bank & Trust Company, 143 La. 1053, 79 So. 857, the Supreme Court in construing Act 171 of 1898, referred to the interpretation placed on said statute by the Fiscal and Banking Department of the State as being "persuasive" and followed the rule of contemporaneous construction by quoting with approval the following from "Sutherland on Statutory Construction":
"`The practical construction given to a doubtful statute by the public officers of the state, and acted upon by the people thereof, is to be considered; it is perhaps decisive in case of doubt. This is similar in effect to a course of judicial decisions. The Legislature is presumed to be cognizant of such construction, and after long continuance, without any legislation evincing its dissent, courts will consider themselves warranted in adopting that construction.' Sutherland on Statutory Construction, par. 309."
*433 The rule of contemporaneous construction embraced in State ex rel. Guillot v. Central Bank & Trust Company, supra, was reaffirmed in Roberts v. City of Baton Rouge, 236 La. 521, 108 So.2d 111, wherein the Supreme Court made it clear that a court may not disregard the letter of an unambiguous law by resorting to the legislative intent thereof because such is proscribed by LSA-C.C. Article 13, nevertheless where the construction of a statute is ambiguous or doubtful, great persuasive (but not necessarily controlling) weight in the judicial interpretation thereof should be given to that construction consistently accorded the statute by those charged with the duty of its administrative application, citing in support of said position Hester v. Louisiana Tax Commission, 227 La. 1022, 81 So.2d 381; Conley v. City of Shreveport, 216 La. 78, 43 So.2d 223; Jackson v. Coxe, 208 La. 715, 23 So.2d 312; State v. Standard Oil Co., 190 La. 338, 182 So. 531.
That the rule of contemporary construction applies to municipal ordinances is no longer open to question. In Cendon v. H. G. Hill Stores, 171 La. 341, 131 So. 41, it was held that the construction of an ordinance as interpreted by a municipal commission council is entitled to consideration. In the later case of Carrere v. Orleans Club, 214 La. 303, 37 So.2d 715, the interpretation of municipal authorities with respect to a municipal zoning ordinance was held entitled to great weight.
Applying the foregoing rules of construction to the case at bar, we find Section 303 of the Code under consideration to be possessed of some degree of ambiguity regarding the necessity of an applicant with five years experience submitting to a written examination as a condition precedent to obtaining a license as an electrician and contractor. We likewise conclude the interpretation thereof consistently followed by defendant Board appears eminently reasonable and in keeping with the intent and purpose of the statute as a whole. The hereinabove cited provisions relative to examination of applicants appears to warrant the interpretation that a written examination is required of the present applicant to determine his fitness and qualification as an electrical contractor. Such an examination, in our judgment, is compatible with the general purpose and intent of the ordinance which is the protection of the public interest and safety against the perils and dangers to life, limb and property inherent in the improper, defective or faulty installation or construction of electrical wiring, works or equipment. The hazards resulting from inefficiencies in such fields are so inherently inimical to the public interest as to warrant the written examination of applicants seeking license on the ground of five years experience or graduation from a trade school because, manifestly, such qualification alone does not of itself insure that the licensee will be an efficient and capable electrical contractor possessed of that skill and learning which the public interest demands. That this is true in the instant case is amply demonstrated by the fact that applicant, though possessing five years experience, nevertheless failed the examination designed to test his skill, knowledge and ability.
Moreover, the plain intent of the Code is to insure that a licensee is skilled and proficient in all phases of the electrical field including, by way of limitation, residential wiring, as well as commercial and industrial installations inasmuch as a license entitles the licensee to hold himself out as capable of doing all types of electrical work, without supervision or exception and does not limit his participation to any particular phase of electrical installations.
We hold therefore it was not the purely ministerial duty of defendant Board to issue applicant's license and that appellee was not entitled to a license as a matter of right, but, on the contrary, plaintiff was required to satisfactorily pass the written examination prescribed by defendant as a condition precedent to receipt of a license *434 as electrical contractor under the Code in question.
It follows that the writ of mandamus was improvidently made peremptory by the learned trial court and said writ must therefore be recalled, reversed and set aside.
Accordingly, it is ordered, adjudged and decreed the alternative writ of mandamus issued herein and made peremptory by the trial court be and the same is hereby annulled, reversed, recalled and set aside and judgment rendered herein in favor of appellant and against appellee dismissing and rejecting plaintiff's suit, at plaintiff's cost.
Reversed and rendered.
