We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4fdd503 commit b1b6644Copy full SHA for b1b6644
Week03/pyramid_oleksii_rak.py
@@ -0,0 +1,9 @@
1
+def calculate_pyramid_height(number_of_blocks):
2
+ height = 0
3
+ blocks_needed = 1
4
+
5
+ while number_of_blocks >= blocks_needed:
6
+ number_of_blocks -= blocks_needed
7
+ height += 1
8
+ blocks_needed += 1
9
+ return height
0 commit comments