Octahedron

Report a typo

A regular octahedron is a three-dimensional geometric shape, a polyhedron with eight equal faces and twelve equal edges. Have you ever seen 8-sided dice? That's a regular octahedron. In this task you need to calculate its area and volume.

Write a program that reads a positive integer representing the edge length of the regular octahedron and prints two values – its area and volume (in that order), both rounded to 2 decimal places and split by one space.

Formula to calculate the area of an octahedron (a is edge length):

23a22*\sqrt{3} *a ^ 2

Formula to calculate the volume:

132a3\frac{1}{3}*\sqrt{2}*a ^ 3

Sample Input 1:

54

Sample Output 1:

10101.32 74229.24
Write a program in Python 3





___

Create a free account to access the full topic