We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a0ee87 commit cb0c88aCopy full SHA for cb0c88a
Week03/pyramid_berra_soyler.py
@@ -0,0 +1,9 @@
1
+def calculate_pyramid_height(blocks):
2
+ height = 0
3
+ total_blocks = 0
4
+
5
+ while total_blocks + (height + 1) <= blocks:
6
+ height += 1
7
+ total_blocks += height
8
9
+ return height
0 commit comments