Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Find the total surface area of a regular pyramid with a square base if each edge of the base measures 16 inches, the slant height of a side is 17 inches and the altitude is 15 inches.
- Ans of the total surface area will be 800
- -------------------------------------------------------------------------------------------------------------------------------------
- class Triangle:
- def __init__(self,base,slant_height):
- self.base=base
- self.slant_height=slant_height
- def perimeter(self):
- return 4*self.base
- def area(self):
- return self.base*self.base
- class Pyramid(Triangle):
- def __init__(self,base,slant_height):
- super().__init__(base,slant_height)
- def total_surface_area(self):
- base_area=super().area()
- perimeter=super().perimeter()
- return 0.5*perimeter*self.slant_height+base_area
- pyramid=Pyramid(16,17)
- print(pyramid.total_surface_area())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement