Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. class students:
  2. def __init__ (self,a,b):
  3. self.name=a
  4. self.age=b
  5.  
  6. def disp(self):
  7. print("name is "+self.name+" age is "+str(self.age))
  8.  
  9. class cld(students):
  10. def __init__(self):
  11. print("child")
  12.  
  13.  
  14. c=cld()
  15. a=students("jack",22)
  16. a.disp()
  17. c.disp()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement