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
Alison is having a hard time at work because her Inbox is flooded with emails every day. Some of these emails are unsolicited. S
miskamm [114]

Personally I just leave them in my inbox because who cares, Alison should; however, move them to the trash I guess

7 0
3 years ago
2. What is the MOST common experience LGBTQ+ individuals share when accessing medical trea
denis23 [38]

Answer:

true on the last one

Explanation:

4 0
3 years ago
Sharing a workbook enables multiple users to access the workbook. What are the benefits of using a shared workbook?
damaskus [11]

Answer:

Some of the benefits of sharing a workbook include:

A. Shared information between students (ie: Mary writes a note about (blank) in the workbook and John reads said note and receives addition information about (blank)).

B. ^adding onto this, discussion on interpretations of a passage (ie: John thinks (blank) means this and Mary thinks (blank) means other thing, through notes they can discuss the meaning of the text.

Hope this helps. =)

8 0
4 years ago
Brad leaves an iPod at Computer Sales & Repair (CSR) to have the battery replaced. CSR sells the iPod to Doris, who does not
katrin2010 [14]
I think the answer is d. I could be wrong.
6 0
4 years ago
Which is the last step to creating a community garden
pentagon [3]

Answer:

construct the garden

Explanation:

step 1. survey the property

step 2. test the soil

step 3. clean contaminants

step 4. consider garden design

step 5. construct the garden

7 0
3 years ago
Other questions:
  • Does a soda vending machine Give reciepts?<br><br>need for computer science hw
    7·2 answers
  • If the boolean expression a is true and b is false, the value of the logical expression a or b is ________.
    14·1 answer
  • Commercial websites have domain names so that users can easily access the web pages by typing the domain names instead of the IP
    12·1 answer
  • How do u beat sonic unleashed
    8·1 answer
  • Two advantages of Internet are ?​
    7·2 answers
  • Destinguish between qualitative data and quantitave
    12·1 answer
  • Last one, this is fashion marketing and I need to know the answer to get the 80%
    6·1 answer
  • Ok who tryna play zombs royale
    7·1 answer
  • Dealing with stress and strong emotions centeral idea​
    6·2 answers
  • What is one way to establish a team's velocity?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!