Write a Python program to print reverse number

Write a Python program to print reverse number

Program

def myfun(): 
    num = int(input("Please Enter any Number: "))
    Reverse = 0
    while(num > 0):
        Reminder = num %10
        Reverse = (Reverse *10) + Reminder
        num = num //10

    print("Reverse of entered number is = %d" %Reverse)
                
if __name__=="__main__":
    myfun()



Output:

Please Enter any Number: 1224
Reverse of entered number is = 4221



More Questions


26 . Write a Python program to print reverse number
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