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 71f5b39 commit 40ef3f8Copy full SHA for 40ef3f8
Week03/pyramid_ege_enc.py
@@ -0,0 +1,10 @@
1
+def calculate_pyramid_height(number_of_blocks):
2
+ n = 1
3
+ height = 0
4
+
5
+ while number_of_blocks >= n:
6
+ height += 1
7
+ number_of_blocks -= n
8
+ n += 1
9
10
+ return height
0 commit comments