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.
2 parents ff53aad + 7875ef4 commit 7568b36Copy full SHA for 7568b36
Week03/pyramid_esra_kaya.py
@@ -0,0 +1,7 @@
1
+def calculate_pyramid_height(number_of_blocks):
2
+ height = 0
3
+ total_blocks = 0
4
+ while total_blocks + height + 1 <= number_of_blocks:
5
+ height += 1
6
+ total_blocks += height
7
+ return height
0 commit comments