Ad Code

Responsive Advertisement

Basic Python Program - 21.

Write a Python program that takes a number and checks weather it is a palindrome or not.

IDE: Visual Studio Code ( VSC ). Present: go2collage.


Download hole Program / Project code, by clicking following link:


Programming Code:

# Basic Python Program # Palindrome or not a number num = int(input("Enter a number: ")) temp = num rev = 0 while num > 0: dig = num % 10 rev = rev * 10 + dig num = num // 10 if temp == rev: print("Number is Palindrome.") else: print("Number is not Palindrome.")


Output:




Post a Comment

0 Comments

Ad Code

Responsive Advertisement