From 8b9183f2ae16162f8efbd1b5ceb0fd2ea371cf94 Mon Sep 17 00:00:00 2001 From: AlisherShalenov Date: Wed, 1 Apr 2026 00:03:13 +0300 Subject: [PATCH] Create pyramid_alisher_shalenov.py --- Week03/pyramid_alisher_shalenov.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Week03/pyramid_alisher_shalenov.py diff --git a/Week03/pyramid_alisher_shalenov.py b/Week03/pyramid_alisher_shalenov.py new file mode 100644 index 00000000..0f1c5457 --- /dev/null +++ b/Week03/pyramid_alisher_shalenov.py @@ -0,0 +1,10 @@ +def calculate_pyramid_height(blocks): + height = 0 + layer = 1 + + while blocks >= layer: + blocks -= layer + height += 1 + layer += 1 + + return height