the error I keep getting says:

:( handles a height of 0 correctly \ expected an exit code of 0, not output of "Type an int between 1 and 23 to build M..."

however, if user types a 0, my loop asks for the int again, as I thought it was supposed to do. I don't get what I'm doing wrong


1 Answer 1


You have misread or misinterpreted the instructions. A pyramid of height 0 is a valid input. Note that 0 is a non-negative integer.

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

  • Thanks Cliff B! this helped
    – Jana B.W.
    Jul 25, 2016 at 12:33
  • I have a similar problem ....but I think i need to paste part of my code: Dec 26, 2016 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .