fork download
  1. # your code goes here
  2. # your code goes here
  3. # your code goes here
  4. # your code goes here
  5. # your code goes here
  6. # your code goes here
  7. # your code goes here
  8. # your code goes here
  9. from abc import ABCMeta,abstractmethod
  10. class Sample():
  11. __metaclass__=ABCMeta
  12. def __init__(self,val):
  13. self.val = "6"
  14.  
  15. @abstractmethod
  16. def absmeth(self):
  17. pass
  18.  
  19. class Imp(Sample):
  20. def __init__(self,val):
  21. super(Imp,self).__init__()
  22.  
  23. def absmeth(self):
  24. print 'Imp'
  25.  
  26. def pr(self):
  27. print self.val
  28.  
  29. i = Imp("5")
  30. i.absmeth()
  31. i.pr()
Runtime error #stdin #stdout #stderr 0s 23304KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 29, in <module>
  File "prog.py", line 21, in __init__
TypeError: __init__() takes exactly 2 arguments (1 given)