Skip to content

Commit 728e97e

Browse files
Create pyramid_mustafa_kilic
1 parent d3b2c3e commit 728e97e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎Week03/pyramid_mustafa_kilic‎

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

0 commit comments

Comments
 (0)