diff --git a/Week03/pyramid_elif_ozkanat.py b/Week03/pyramid_elif_ozkanat.py new file mode 100644 index 00000000..97f3d839 --- /dev/null +++ b/Week03/pyramid_elif_ozkanat.py @@ -0,0 +1,8 @@ +def calculate_pyramid_height(number_of_blocks): + height=0 + while number_of_blocks >= (height+1): + height+=1 + number_of_blocks-=height + return height + +print(calculate_pyramid_height(240))