Beta
Details of an N-Dimensional Hyperrectangle
Description:
What is a hyperrectangle?
A hyperrectangle is a generalisation of a rectangle into higher or lower dimensions.
Examples of hyperrectangles
- A hyperrectangle in 2 dimensions would be a rectangle
- its hyperperimeter would be a rectangle's perimeter
- its hyperarea would be its area.
- A hyperrectangle in 3 dimensions would be a cuboid
- its hyperperimeter would be its surface area
- its hyperarea would be its volume.
- A hyperectangle in 4 dimensions
- its hyperperimeter would be its surface volume
- its hyperarea that would be its hypervolume.
Your Goal
Write a function that takes in the sides of an n-dimensional hyperrectangle as an array of length n, each item representing a length of the hyperrectangle, and outputs its associated hyperarea and hyperperimeter in a tuple of length 2
Technicalities
- Assume a point (0-dimensional shape) has a hyperarea of None and a hyperperimeter of None
- Assume a line (1-dimensional shape) has a hyperarea of its length and a hyperperimeter of None
Geometry
Puzzles
Similar Kata:
Stats:
Created | Jan 7, 2022 |
Published | Jan 8, 2022 |
Warriors Trained | 92 |
Total Skips | 30 |
Total Code Submissions | 107 |
Total Times Completed | 35 |
Python Completions | 35 |
Total Stars | 2 |
% of votes with a positive feedback rating | 86% of 18 |
Total "Very Satisfied" Votes | 14 |
Total "Somewhat Satisfied" Votes | 3 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 18 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |