Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
oops1.py
#python 3.5.2 #oops in python class Human: def __init__(self,name,age):#this method is used to create/define varibles in an object self.name=name self.age=age print('name: ',self.name) print('age: ',self.age) def details(self): print('name: ',self.name) print('age: ',self.age) h1=Human('Ashu',23)#Constructor (Human()) calls __init__() method implicitly at the time of object creation to initilize the object h2=Human('Ranjan',45) Human.details(h1) h2.details() print(h1.name)
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
PyDescript
15
mansur
>= Number regex generator
3564
max area rectangle
H.W.5 ALL Solutions
PVJ-COMP1-1-EQUIPO1
ReverseArray.py
HW. Bubble Sort Descending Order
Please log in to post a comment.