Advertisement
Adehumble

Week8|9 Coding Exercise 1

Apr 1st, 2020
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. #1
  2. #This program is written to simply demonstrates how a class can be created and how to instantiate objects from a class blueprint.
  3.  
  4.  
  5. class Superhero():
  6.     """This is an empty class."""
  7.     pass
  8.  
  9.        
  10. #The following lines are the objects made from the blueprint of a Superhero class.
  11.    
  12. spiderman=Superhero()
  13. batman=Superhero()
  14. superman=Superhero()
  15.  
  16.  
  17. #The following prints statements, if uncommented, validates that the corresponding print statements arguments are real objects made from the Superhero class.
  18.  
  19. #print(spiderman)
  20. #print(batman)
  21. #print(superman)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement