From b24da347b159d4e04b12c4cc4e1deeee3c300436 Mon Sep 17 00:00:00 2001 From: enes karakus Date: Mon, 26 Oct 2026 17:39:29 +0300 Subject: [PATCH] Add function to calculate pyramid height. --- .idea/.gitignore | 5 +++++ .idea/PythonProgramming.iml | 10 ++++++++++ .idea/inspectionProfiles/profiles_settings.xml | 6 ++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ Week03/pyramid_enes_karakus.py | 6 ++++++ 6 files changed, 41 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/PythonProgramming.iml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 Week03/pyramid_enes_karakus.py diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..b58b603fe --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/PythonProgramming.iml b/.idea/PythonProgramming.iml new file mode 100644 index 000000000..7aa9c2602 --- /dev/null +++ b/.idea/PythonProgramming.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 000000000..105ce2da2 --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 000000000..a61ec44b7 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000..35eb1ddfb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Week03/pyramid_enes_karakus.py b/Week03/pyramid_enes_karakus.py new file mode 100644 index 000000000..f32746a73 --- /dev/null +++ b/Week03/pyramid_enes_karakus.py @@ -0,0 +1,6 @@ +def calculate_pyramid_height(number_of_blocks): + height = 0 + while number_of_blocks > height: + height += 1 + number_of_blocks -= height + return height \ No newline at end of file