Identify the words of Palindrum
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
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
let msg = 'error' alert(msg)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
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
def is_palindrome(word):
return word == word[::-1]
word = input("کلمه را وارد کنید: ")
if is_palindrome(word):
print("کلمه پالیندروم است.")
else:
print("کلمه پالیندروم نیست.")
a=input("Please,enter word:\n")
b=len(a)
k=0
for i in range((b//2)):
if a[i]==a[b-i-1]:
k+=1
continue
else:
break
if b%2==0 and (k*2)==b or b%2!=0 and (k*2)+1==b:
print("The word is Palindrome.")
else:
print("The word is not Palindrome.")
word=input("enter your word")
li_word=[]
for x in word:
li_word.append(x)
mirroring_li_word=li_word[::-1]
if mirroring_li_word==li_word:
print("ok")
else:
print("not ok")
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.")
a=input()
c=a.lower()
b=a[::-1]
d=b.lower()
if c==d:
print('palindrom')
else:
print('not palindrom')
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")
Submitting answers is currently unavailable.
You must be logged in to access this section.
Login/Sign up If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.