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 6eb73e1 + e03fe1b commit a4f926eCopy full SHA for a4f926e
Week03/pyramid_rukiye_ilhan.py
@@ -0,0 +1,7 @@
1
+def calculate_pyramid_height(number_of_blocks):
2
+ used_block = 0
3
+ height = 0
4
+ while(number_of_blocks - used_block > height):
5
+ height = height + 1
6
+ used_block = (height*(height + 1)//2)
7
+ return height
0 commit comments