From 9dd7fd1567575a0d63b30a21ccce0cffe853984d Mon Sep 17 00:00:00 2001 From: Erbangurcan Date: Tue, 17 Mar 2026 20:00:47 +0300 Subject: [PATCH] Create pyramid_erban_gurcan.py --- Week03/pyramid_erban_gurcan.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Week03/pyramid_erban_gurcan.py diff --git a/Week03/pyramid_erban_gurcan.py b/Week03/pyramid_erban_gurcan.py new file mode 100644 index 00000000..a2330053 --- /dev/null +++ b/Week03/pyramid_erban_gurcan.py @@ -0,0 +1,8 @@ +def calculate_pyramid_height(number_of_blocks): + height = 0 + +while number_of_blocks > height: + height += 1 + number_of_blocks -= height + + return height