diff --git a/Week03/pyramid_mustafa_kilic b/Week03/pyramid_mustafa_kilic new file mode 100644 index 00000000..add3420d --- /dev/null +++ b/Week03/pyramid_mustafa_kilic @@ -0,0 +1,10 @@ +def calculate_pyramid_height(number_of_blocks): + height = 0 + i = 1 + + while number_of_blocks >= i: + number_of_blocks -= i + height += 1 + i += 1 + + return height