Checking a Number for Palindromic Behavior

Discussion in 'Python' started by Benjamin Middaugh, Oct 18, 2009.

  1. 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 ends but 1551 is. I think the simplest way would be to
    work inwards from both ends checking digits for equality, but I don't
    know enough (yet) to do this.

    All help is much appreciated.

    Benjamin
     
    Benjamin Middaugh, Oct 18, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    432
  2. Mantorok Redgormor
    Replies:
    70
    Views:
    1,820
    Dan Pop
    Feb 17, 2004
  3. lovecreatesbeauty

    Determine if a character string is palindromic

    lovecreatesbeauty, May 8, 2006, in forum: C Programming
    Replies:
    25
    Views:
    921
    Denis Kasak
    May 9, 2006
  4. MRAB
    Replies:
    7
    Views:
    363
    Guyon Morée
    Oct 20, 2009
  5. Gary Herron
    Replies:
    25
    Views:
    712
Loading...

Share This Page