From 0dc88963e17bd34e5f62736218f9856e8a2a516a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20=C3=96zt=C3=BCrk?= <97892689+burakozturk1@users.noreply.github.com> Date: Mon, 6 Jan 2025 21:46:16 +0300 Subject: [PATCH] Create pyramid_burak_ozturk.py --- Week03/pyramid_burak_ozturk.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Week03/pyramid_burak_ozturk.py diff --git a/Week03/pyramid_burak_ozturk.py b/Week03/pyramid_burak_ozturk.py new file mode 100644 index 00000000..8e8abbb5 --- /dev/null +++ b/Week03/pyramid_burak_ozturk.py @@ -0,0 +1,7 @@ +def calculate_pyramid_height(number_of_blocks): + height = 0 + count = 0 + while count <= number_of_blocks: + height += 1 + count += height + return height - 1