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