Computer Science, asked by RudeGirl123, 11 months ago

Write a program that reads a string and checks whether it is a palindrome string or not.


QGP: Which Programming Language do you want it in?
RudeGirl123: Python
RudeGirl123: help me with this question please....
https://brainly.in/question/9781925
AbhijithPrakash: Can I answer??
RudeGirl123: Ok..

Answers

Answered by AbhijithPrakash
26
  1. string = input("Enter a string:")
  2. length = len(string)
  3. mid = length/2
  4. rev = -1
  5. for a in range(mid) :
  6.    if string[a] == string[rev] :
  7.        a += 1
  8.        rev -= 1
  9.    else :
  10.        print (string, "its not a palindrome")
  11.        break
  12. else :
  13.        print (string, "is a palindrome")

RudeGirl123: last help please
https://brainly.in/question/9753572
Answered by titansray66
0

Explanation:

check it out in photo answer is there

Attachments:
Similar questions