SELECT *
FROM (`youtube_videos`)
WHERE `display_status` = 1
ORDER BY `video_id` desc
LIMIT 1SELECT *
FROM (`youtube_videos`)
WHERE `display_status` = 1
ORDER BY `video_id` desc Python Classes and Objects 12th Standard
Computer Science What is class? What is instantiation? What is the output of the following program? How will you create constructor in Python? What is the purpose of Destructor? Write the general form of declaring class in Python. Write the syntax for the following Differentiate python class function and ordinary function. Name the function which acts as a constructor and destructor. Write a program in python that illustrate the use of constructor. Explain the working of the following program Write a note on public and private data members of python class.
12th Computer Science - Python Classes and Objects - Two Marks Study Materials
8682895000 Jan-22 , 2020
Python Classes and Objects - Two Marks Study Materials
Reg.No. :
Class Sample:
__num=10
def disp(self):
print(self.__num)
S=Sample()
S.disp()
print(S.__num)
(i) Creating objects
(ii) Accessing class members
class Sample:
num=0
def _init_(self) var):
Sample.num+= 1
self.var=var
print("The object value is = ", var)
print("The count of object created Sample.num) =",
S1=Sample(15)
S2=Sample(35)
S3=Sample(45)
*****************************************
Reviews & Comments about 12th Computer Science - Python Classes and Objects - Two Marks Study Materials
Write your Comment