Daily Python Problem: Palindrome Checker

Hello connections, It's been a long time since I last connected with you all. I hope you are doing well✨. From today onwards, I will be sharing one Python problem daily to improve problem-solving skills and consistency in coding practice. Here is Day 1 question: 🧠 Write a Python program to check whether a number is a palindrome. ✍️My Approach: num=int(input("Enter a number:")) temp=num rev=0 while temp>0: r=temp%10 temp=temp//10 rev= (rev * 10) +r if num==rev: print (num, "is palindrome") else: print (num, "is not a palindrome") Now it's your turn Try writing your own answer or improve this one in the comments 👇 #Python #CodingChallenge #ProblemSolving #Learning

To view or add a comment, sign in

Explore content categories