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 54d0c5f commit c483bd1Copy full SHA for c483bd1
Week03/pyramid_niyazi_cetinkaya.py
@@ -0,0 +1,10 @@
1
+def calculate_pyramid_height(number_of_blocks: int) -> int:
2
+ height = 0
3
+ while True:
4
+ if number_of_blocks > height*(height+1)/2:
5
+ height = height + 1
6
+ else:break
7
+ return height
8
+
9
10
+print(calculate_pyramid_height(7))
0 commit comments