So for this coding exercise I have to input a number of imaginary blocks and it will tell me how many complete rows high the pyramid is.
So for example if I input 6 blocks...I want it to tell me that the height of the pyramid is 3. (3 blocks on the bottom, 2 above that, and 1 above that).
In my head I feel this would work similar to a Fibonacci pyramid so I based my code off of that.
blocks = int(input("Enter number of blocks: "))for i in range(blocks + 1):for j in range(blocks + 1):height = j / 2
if height % 2 == 0:height = height / 2print(f"The height of the pyramid: {height}")
This is what I have so far... If I do the number 6 or like 20 it works, but obviously if I do something like 1000 it isn't going to give me the result I want. I feel I'm pretty far off with my code.