diff --git a/Week03/pyramid_umut_turk.py b/Week03/pyramid_umut_turk.py new file mode 100644 index 00000000..48b495b4 --- /dev/null +++ b/Week03/pyramid_umut_turk.py @@ -0,0 +1,12 @@ +def calculate_pyramid_height(number_of_blocs): + a = 0 + p_block = 0 + while number_of_blocs > p_block: + a +=1 + p_block += a + if number_of_blocs == p_block: + height = a + else: + height = a-1 + + return height \ No newline at end of file