Skip to content

Commit c4febc7

Browse files
authored
Update and rename test_pyramid.py to pyramid_hasan_canli.py
1 parent 5ae1705 commit c4febc7

File tree

2 files changed

+13
-52
lines changed

2 files changed

+13
-52
lines changed

Week03/pyramid_hasan_canli.py

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

Week03/test_pyramid.py

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)