CodeSolved

Solved Programming Questions & Exercises

Identify the words of Palindrum

Practice Easy 1010/ Download 2413 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

13 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.
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.")

Zaras Download Python
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
c = input("enter: ")
if c[::-1] == c:
    print('yes')
else:
    print('no')
User 5141 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")
Sumy.amiri Download Python
<< Previous page 1 2 Next page >>

Submit answer

Submitting answers is currently unavailable.

×
×
Close