Ad
  • Custom User Avatar

    I agree. I had to use ChatGPT after having tried everything I could think of (which at my stage in learning to code isn't much).

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    As someone who has just started learning Python, this confused me as the instructions mention to use a non-negative interger (n) and a string (s).

    I ended up trying to use n and s in my code instead of what was meant to be used as I thought I was being instructed to use n and s as variables or something.

  • Custom User Avatar

    As a complete beginner this confused me at first as I used print and was wondering why I was getting the correct answers but was being told it was wrong. I eventually realised I was using the wrong statement.

  • Custom User Avatar

    I've begun learning Python coming from doing a lot of data analytics with Excel and so I approached this with the logic I would there:

    if n or m is less than 1 (in other words 0 or less) return 0, otherwise multiply n & m.

    For some reason it's implying that the first case (5 and 5) are both less than 1 and returning 0 when it should be 25. I have no idea why.

    Edit: I've just realised you can't specify n or m <1. It has to be n <1 or m <1