I'm trying to do mario problem -- can't figure it out. I watched Zamylas' walkthrough, watched all the videos, but I can't get it right :-(

Here's where I'm at:


error figured out :)

  • yes, you can...
    – kzidane
    Jun 20 '15 at 12:05
  • OK, thanks -- I just did
    – alex1x
    Jun 20 '15 at 12:19

you could hard-code the initial number of hashes since it's always gonna be 2 actually.

you need the first nested loop (the one that draws spaces) to iterate less times after each row. similarly, you need the second nested loop (the one that draws hashes) to iterate more times after each row.

probably the easiest way to do that is to update your variables spaces and hashes after each row.

  • OK, I hardcoded it to 2 like you said, I removed "spaces" and just defined spaces as relative to "hashes", and then I added "hashes++" on each iteration... it worked! I re-watched Zamylas' video and now understood the concepts and her points better.
    – alex1x
    Jun 20 '15 at 12:44

You must log in to answer this question.

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