Re: Checking a Number for Palindromic Behavior

2009-10-20 Thread Benjamin Middaugh
Actually I was working on a program to test the so-called 196-algorithm as an extracurricular activity. MRAB was most helpful with pointing out what I should have already thought of. My previous attempts were hampered by my limited knowledge of python, and I had already mentally committed to my

Checking a Number for Palindromic Behavior

2009-10-18 Thread Benjamin Middaugh
Thanks to everyone who helped with my query on reversing integers. I have one more simple problem I'm having trouble solving. I want to check a number for palindromic behavior (reading the same backwards and forwards). So if I have an integer 1457 it can tell me this is not the same from both e

Reverse Iteration Through Integers

2009-10-18 Thread Benjamin Middaugh
I'm trying to make an integer that is the reverse of an existing integer such that 169 becomes 961. I guess I don't know enough yet to figure out how to do this without a ton of awkward-looking code. I've tried for loops without much success. I guess I need a good way of figuring out the length