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 f0652b0Copy full SHA for f0652b0
Week03/pyramid_first_last.py
@@ -0,0 +1,8 @@
1
+def calculate_pyramid_height(number_of_blocks):
2
+ height=0
3
+ while number_of_blocks >= (height+1):
4
+ height+=1
5
+ number_of_blocks-=height
6
+ return height
7
+
8
+print(calculate_pyramid_height(240))
0 commit comments