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