मराठी

When are the following built-in exceptions raised? Give examples to support your answer. NameError - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

When are the following built-in exceptions raised? Give examples to support your answer.

NameError

टीपा लिहा

उत्तर

It is raised when a local or global variable name is not defined.

 >>> print(name)
       Traceback (most recent call last):
         File "", line 1, in 
           print(name)
       NameError: name 'name' is not defined
shaalaa.com
Built-in Exceptions
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1: Exception Handling in Python - Exercise [पृष्ठ १७]

APPEARS IN

एनसीईआरटी Computer Science [English] Class 12
पाठ 1 Exception Handling in Python
Exercise | Q 2. c) | पृष्ठ १७
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×