diff --git a/Week03/pyramid_emir_karaduman b/Week03/pyramid_emir_karaduman new file mode 100644 index 00000000..697903bf --- /dev/null +++ b/Week03/pyramid_emir_karaduman @@ -0,0 +1,10 @@ +def calculate_pyramid_height(number_of_blocks: int) -> int: + height = 0 + used_blocks = 0 + + while used_blocks + (height + 1) <= number_of_blocks: + height += 1 + used_blocks += height + + return height +