CodeSolved

A comprehensive source of programming questions and exercises

Identify the words of Palindrum

Practice Easy 1010/ Download 1678 Views

Write a program that receives a word and checks if the word Palindrum is.

Palindroum words are words that are read from both sides to the same form like: wolf

11 Answers

This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
def palindrom():
    word=input("Enter a word : ").lower()
    start=word[0]
    end=word[-1]
    if start == end:
        print(f'{word} is palindrom')
    else:
        print(f'{word} is not palindrom') 
palindrom()
word=input("Type your word:")
if word==word[::-1]:
    print("The word is Palindrome")
else:
    print("Your word isn't Palindrome.")
Yasin.hn Download Python
a=input()
c=a.lower()
b=a[::-1]
d=b.lower()
if c==d:
    print('palindrom')
else:
    print('not palindrom')
User 2893 Download Python
word = input()
letters = []
reversedd = str()
count = len(word)
while (count > 0):
    letters.append(word[count-1])
    count = count - 1
reversedd = reversedd.join(letters)
print (reversedd)
if reversedd == word:
    print("true")
else : print("False")
User 1755 Download Python
import time
start_time = time.time()
while True:
    if time.time() - start_time > 20:
        print("time up")
        break
    name =str(input("enter your name:"))
    if name == "0":
        print("end")
        break
    if name[0] == name[-1]:
        print("your name is a palindrame")
    else:
        print("your name is not a palindram")
class PalindromeChecker:
    def __init__(self, word):
        self.word = word

    def is_palindrome(self):
        cleaned_word = self.word.replace(" ", "").lower()
        return cleaned_word == cleaned_word[::-1]

word = input("کلمه‌ای وارد کنید: ")
checker = PalindromeChecker(word)

if checker.is_palindrome():
    print("کلمه پالیندروم است.")
else:
    print("کلمه پالیندروم نیست.")
Roghaye.m Download Python
while True:
    s = input("enter a word: ")
    if s=="exit":
        break
        print("yes")
    elif s == s[::-1]:
        print("yes")
    else:
        print("No")
User 195 Download Python
<< Previous page 1 2 Next page >>

Submit answer

Submitting answers is currently unavailable.

Related content

Detection using AI
×
×
Close