1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sergey [27]
3 years ago
7

A palindrome is a word or a phrase that is the same when read both forward and backward. Examples are: "bob," "sees," or "never

odd or even" (ignoring spaces). Write a program whose input is a word or phrase, and that outputs whether the input is a palindrome.
Ex: If the input is:
bob
the output is:
bob is a palindrome
Ex: If the input is:
bobby
the output is:
bobby is not a palindrome
Computers and Technology
1 answer:
zubka84 [21]3 years ago
5 0

Answer:

string = input()

normal = ""

reverse = ""

for i in range(len(string)):

   if string[i].isalpha():

       normal += string[i].lower()

       reverse = string[i].lower() + reverse

if normal == reverse:

   print(string + " is a palindrome")

else:

   print(string + " is not a palindrome")

Explanation:

  • Loop up to the length of string.
  • Use an if statement to check if a certain character is an alphabet.
  • Check if both the normal and reverse strings are equal, then display that it is a palindrome.
You might be interested in
Suppose a friend asks you for advice on RSS feeds. What would be a reason you would suggest using RSS feeds?
Yuliya22 [10]

Answer:

to vein info ffom all search engines

4 0
3 years ago
A Network Systems employee set up a network-wide password system in which other employees log in to access their work. Which tas
Anton [14]

The correct answer is C. protecting confidentiality.

3 0
3 years ago
Read 2 more answers
TRUE OR FALSE! A query can have no more than three common interpretations.
Vanyuwa [196]

A query can have no more than three common interpretations is false. A query is a search through a source to find the answer to something. A common interpretation are the items that pop up in in the first spots of the search query because they are the most relatable to the question. A common interpretation usually answers the question, but there are times that the question is more complex and needs to be search for longer within the sources that pop up.

8 0
3 years ago
What does the Auto Fill tool do?
ki77a [65]
I believe this a microsoft tool it <span>It automatically populates data into cells that reference other cells :)

hope this helps</span>
7 0
4 years ago
Read 2 more answers
What’s ur guys rank of all 3D Mario games (all of these are great games btw)? These are my opinions I’d rly enjoy hearing yours.
Blizzard [7]

Answer:

super mario galaxy best of all time

Explanation:

3 0
3 years ago
Other questions:
  • You will use the _____
    15·2 answers
  • Eva is listening to music while she browses the Internet. Which type of operating system must she be using?
    10·2 answers
  • 1) Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a s
    11·1 answer
  • Can someone help me with my homework?
    7·1 answer
  • If nobody buys a ticket to a movie, do they still show it?
    5·1 answer
  • Who is the host in super monkey ball?
    14·1 answer
  • a deque is a type of collection,but it is not automatically available when you open IDLE. What is missing that allows you to use
    14·2 answers
  • Discuss any five factors that hinder the application of a computer in business organisations​
    15·2 answers
  • Mohammed’s parents learn that his classmates have begun sending him text messages making fun of his heritage. Mohammed says he’s
    5·2 answers
  • What is the most used gaming keyboard in 2022?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!