Advertisement
skaterksa

test square and volume

Nov 19th, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. class TwoDim():
  2.     def __init__(length, width):
  3.         self.length = length
  4.         self.width = width
  5.         self.square = self.length * self.width
  6.        
  7. class ThreeDim(TwoDim):
  8.     def __init__(height):
  9.         self.height = height
  10.         self.volume = self.square * self.height
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement