python - 3 digit palindrome products -
i'm trying find largest palindrome product of 2 3 - digit number. code, below. have no idea why isn't working. please!? according me should scan through possible combinations , provide me answer.. doesnt seem work. ideas ?
there may other problems code, it's hard tell when can't see how file on computer indented. also, if b = 99:
should if b = 99:
, python interpreter gives syntaxerror if
. please post actual code that's on computer, indented inside code block.
your main problem you're not re-calculating product inside while loop. , test if it's palindrome you'll need convert product string inside loop. also, loop should test a
remains valid, although that's not critical here, since when fix other stuff loop break before a
becomes invalid.
Comments
Post a Comment