In Python, function names are case-sensitive. The correct function is print(), not Print().
When you write Print("Hello world"), Python tries to find a variable or function named Print, which doesn’t exist — hence it raises a NameError.
Example Output:
✔️ Key Point:
Always remember that Python is case-sensitive, so print() must be written in all lowercase.
Read the following statements and arrange them in the correct order.
A. Exception is raised
B. Executes exception
C. Program searches for exception handler
D. Create exception object
E. An error encountered
Choose the correct answer from the options given below:
When an exception occurs in a program, the sequence is as follows:
E → An error is encountered
D → An exception object is created
A → The exception is raised (thrown)
C → The program searches for an appropriate exception handler
B → If found, the exception handler (catch block) is executed
Hence, the correct order is E → D → A → C → B.
Online Test Series,
Information About Examination,
Syllabus, Notification
and More.
Online Test Series,
Information About Examination,
Syllabus, Notification
and More.