Write a Python Program to print Palindrome numbers from 1 to 100

Write a Python Program to print Palindrome numbers from 1 to 100

Program

def myfun(): 
    maximum = int(input(" Please Enter the Maximum Value : "))
    minimum=1
    print("Palindrome Numbers between %d and %d are : " %(minimum, maximum))
    for num in range(minimum, maximum + 1):
        temp = num
        reverse = 0
    
        while(temp > 0):
            Reminder = temp % 10
            reverse = (reverse * 10) + Reminder
            temp = temp //10

        if(num == reverse):
            print("%d " %num, end = ' ')
                
if __name__=="__main__":
    myfun()



Output:

Please Enter the Maximum Value : 100
Palindrome Numbers between 1 and 100 are :
1 2 3 4 5 6 7 8 9 11 22 33 44 55 66 77 88 99


More Questions


27 . Write a Python Program to print Palindrome numbers from 1 to 100
28 . Write a Python Program to find the factorial of a number using recursion
29 . Write a Python Program to check armstrong number of n digits
30 . Write a program to check armstrong numbers in certain interval
31 . Write a program to merging dictionaries
32 . Write a program to print swapping variables
33 . Write a python program to counting item occurrences
34 . Write a python program to print flatten a nested list
35 . Write a python program to Find the index of the largest number in the list
36 . Write a python program to Find the index of the smallest number in the list
37 . Write a python program to find absolute value of a number in the list