Skip to content

Commit 47b60e1

Browse files
authored
Merge pull request #678 from ozgegoksu/patch-2
Create pyramid_ozge_goksu.py
2 parents c7e76ee + 482ccad commit 47b60e1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Week03/pyramid_ozge_goksu.py

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

0 commit comments

Comments
 (0)