Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Cool solution in Creative category for Building Base by gabor285
class Building:
def __init__(self, *a):
self.a = a+(10,) if len(a)<5 else a
self.s,self.w,self.w_WE,self.w_NS,self.h = self.a
corners = lambda s:{'north-west' :[s.w_NS+s.s,s.w],'north-east' :[s.w_NS+s.s,s.w_WE+s.w], 'south-west' :[s.s,s.w],'south-east' :[s.s,s.w_WE+s.w]}
area = lambda s:s.w_WE * s.w_NS
volume = lambda s:s.area() * s.h
__repr__ = lambda s:"Building({}, {}, {}, {}, {})".format(*s.a)
Dec. 19, 2015
Comments: