From 112c0bf9f90ff7d8e01c0e456716c755ef21a40b Mon Sep 17 00:00:00 2001 From: Emir Karaduman <220315028@ogr.cbu.edu.tr> Date: Thu, 8 Jan 2026 22:39:39 +0300 Subject: [PATCH] pyramid_emir_karaduman --- Week03/emir_karaduman_pyramid | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Week03/emir_karaduman_pyramid diff --git a/Week03/emir_karaduman_pyramid b/Week03/emir_karaduman_pyramid new file mode 100644 index 00000000..08d4cd3d --- /dev/null +++ b/Week03/emir_karaduman_pyramid @@ -0,0 +1,7 @@ +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