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
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.")
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")
c = input("enter: ")
if c[::-1] == c:
print('yes')
else:
print('no')
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")
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.