Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

find palindrome number up to n in python

#Problem of Mahabubul Alam Data structures book
n = int(input("Enter the values of N - "))
for i in range(1, n+1):
    si = str(i)
    rsi = si[::-1]
    if si == rsi:
        print(i,"is palindrome number.")
Source by www.coursera.org #
 
PREVIOUS NEXT
Tagged: #find #palindrome #number #python
ADD COMMENT
Topic
Name
1+2 =