हिंदी
तमिलनाडु बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान कक्षा १२

What is the output of the following program? class Greeting: def __init__(self, name): self.__name = name def display(self): print("Good Morning ", self.__name) obj=Greeting('Bindu Madhavan') - Computer Science

Advertisements
Advertisements

प्रश्न

What is the output of the following program?

class Greeting:
 def __init__(self, name):
 self.__name = name
 def display(self):
 print("Good Morning ", self.__name)
 obj=Greeting('Bindu Madhavan')
 obj.display()
एक पंक्ति में उत्तर
Advertisements

उत्तर

Good Morning BinduMadhavan

shaalaa.com
Sample Programs to Illustrate Classes and Objects
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 10: Python Classes and objects - Evaluation [पृष्ठ १८८]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 12 TN Board
अध्याय 10 Python Classes and objects
Evaluation | Q 4. | पृष्ठ १८८
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×