Explain the punishment for giving false evidence as per Indian Penal Code (IPC 1860) Section 193: Punishment for false evidence and their relevant Bharatiya Nyaya Sanhita 2023 (BNS 2023) code reference.

{'IPC Section': '193', 'IPC Heading': 'Punishment for false evidence', 'IPC Descriptions': ' Indian Penal Code, 1860 
193.
Punishment for false evidence 
Whoever intentionally
gives false evidence in any stage of a judicial proceeding, or fabricates false
evidence for the purpose of being used in any stage of a judicial proceeding,
shall be punished with imprisonment of either description for a term which may
extend to seven years, and shall also be liable to fine, and whoever
intentionally gives or fabricates false evidence in any other case, shall be
punished with imprisonment of either description for a term which may extend to
three years, and shall also be liable to fine.
Explanation 1  A trial before a Courtmartial; 101[] is a
judicial proceeding. 
Explanation 2  An investigation directed by law preliminary to a
proceeding before a Court of Justice, is a stage of a judicial proceeding,
though that investigation may not take place before a Court of Justice. 
Illustration
A, in an enquiry
before a Magistrate for the purpose of ascertaining whether Z ought to be
committed for trial, makes on oath a statement which he knows to be false. As
this enquiry is a state of a judicial proceeding, A has given false evidence.
Explanation 3  An investigation directed by a Court of Justice according
to law, and conducted under the authority of a Court of Justice, is a state of
a judicial proceeding, though that investigation may not take place before a
Court of Justice. 
Illustration
A, in any enquiry
before an officer deputed by a Court of Justice to ascertain on the spot the
boundaries of land, makes on oath a statement which he knows to be false. As
this enquiry is a stage of a judicial proceeding. A has given false evidence.', 'BNS Section': '229', 'BNS Heading': 'Punishment for false evidence', 'BNS description': 'The Bharatiya Nyaya Sanhita, 2023
229. Punishment for false evidence.
(1) Whoever intentionally gives false evidence in any stage of a judicial proceeding, or fabricates false evidence for the purpose of being used in any stage of a judicial proceeding, shall be punished with imprisonment of either description for a term which may extend to seven years, and shall also be liable to fine which may extend to ten thousand rupees.
(2) Whoever intentionally gives or fabricates false evidence in any case other than that referred to in subsection (1), shall be punished with imprisonment of either description for a term which may extend to three years, and shall also be liable to fine which may extend to five thousand rupees.
Explanation 1.A trial before a Courtmartial is a judicial proceeding.
Explanation 2.An investigation directed by law preliminary to a proceeding before a Court, is a stage of a judicial proceeding, though that investigation may not take place before a Court. Illustration. A, in an enquiry before a Magistrate for the purpose of ascertaining whether Z ought to be committed for trial, makes on oath a statement which he knows to be false. As this enquiry is a stage of a judicial proceeding, A has given false evidence.
Explanation 3.An investigation directed by a Court according to law, and conducted under the authority of a Court, is a stage of a judicial proceeding, though that investigation may not take place before a Court. Illustration. A, in an enquiry before an officer deputed by a Court to ascertain on the spot the boundaries of land, makes on oath a statement which he knows to be false. As this enquiry is a stage of a judicial proceeding, A has given false evidence.'}