From d1165b940cf06de388d6f3257f03f21a9fc818f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Esat=20Ulu=C3=B6z?= <161027888+Ismail-Esat-Uluoz@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:22:18 +0300 Subject: [PATCH] Create pyramid_ismailesat_uluoz.py --- Week03/pyramid_ismailesat_uluoz.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Week03/pyramid_ismailesat_uluoz.py diff --git a/Week03/pyramid_ismailesat_uluoz.py b/Week03/pyramid_ismailesat_uluoz.py new file mode 100644 index 00000000..0f4eaf66 --- /dev/null +++ b/Week03/pyramid_ismailesat_uluoz.py @@ -0,0 +1,11 @@ +def calculate_pyramid_height(number_of_blocks): + height = 0 + + while number_of_blocks >= 1: + if number_of_blocks >= height + 1: + height += 1 + number_of_blocks -= height + else: + break + + return height