diff --git "a/Week03/pyramid_ayseselin_karg\304\261.py" "b/Week03/pyramid_ayseselin_karg\304\261.py" new file mode 100644 index 00000000..c8660bb8 --- /dev/null +++ "b/Week03/pyramid_ayseselin_karg\304\261.py" @@ -0,0 +1,9 @@ +def calculate_pyramid_height(number_of_blocks): + height = 0 + blocks_used = 0 + + while blocks_used + (height + 1) <= number_of_blocks: + height += 1 + blocks_used += height + + return height