Skip to content

Commit 2a6da2b

Browse files
authored
Add files via upload
1 parent d3b2c3e commit 2a6da2b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Week03/pyramid_cemil_koca.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
def calculate_pyramid_height(number_of_blocks):
2+
height = 0
3+
remaining = number_of_blocks
4+
5+
while remaining >= height + 1:
6+
height += 1
7+
remaining -= height
8+
9+
return height

0 commit comments

Comments
 (0)