From 920d4d5924cd1d2800449d000e9913291d09dd8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fevzi=20Ba=C4=9Fr=C4=B1a=C3=A7=C4=B1k?= <124450541+fevzibagriacik@users.noreply.github.com> Date: Thu, 2 Apr 2026 17:30:48 +0300 Subject: [PATCH] Create pyramid_fevzi_bagriacik.py --- Week03/pyramid_fevzi_bagriacik.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Week03/pyramid_fevzi_bagriacik.py diff --git a/Week03/pyramid_fevzi_bagriacik.py b/Week03/pyramid_fevzi_bagriacik.py new file mode 100644 index 00000000..edf9d8ab --- /dev/null +++ b/Week03/pyramid_fevzi_bagriacik.py @@ -0,0 +1,11 @@ +def calculate_pyramid_height(number_of_blocks): + height = 0 + total = 0 + i = 1 + + while total + i <= number_of_blocks: + total += i + height += 1 + i += 1 + + return height