Skip to content

Commit 2098e2a

Browse files
authored
Merge pull request #831 from burakozturk1/patch-3
Create pyramid_burak_ozturk.py
2 parents 40826fc + 0dc8896 commit 2098e2a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Week03/pyramid_burak_ozturk.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def calculate_pyramid_height(number_of_blocks):
2+
height = 0
3+
count = 0
4+
while count <= number_of_blocks:
5+
height += 1
6+
count += height
7+
return height - 1

0 commit comments

Comments
 (0)