diff --git a/Week03/pyramid_basak_kocan.py b/Week03/pyramid_basak_kocan.py new file mode 100644 index 00000000..fd9b52bf --- /dev/null +++ b/Week03/pyramid_basak_kocan.py @@ -0,0 +1,9 @@ +def calculate_pyramid_height(number_of_blocks): + height = 0 + count = 1 + while (number_of_blocks>=1): + height += 1 + count += 1 + for i in range(0, count): + number_of_blocks -= 1 + return height