SlideShare a Scribd company logo
In Python: 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.
Input: Bob
output: palindrome: bob
output: not a palindrome: bobby
input: dr awkward
output: not a palindrome: dr awkward
here is my code but it is not removing the white spaces from the string. Could you please tell me
why

More Related Content

More from ColinjSWDavidsonn

In Chapter 8 you were introduced to the water-soluble vitamins- includ (1).pdf
In Chapter 8 you were introduced to the water-soluble vitamins- includ (1).pdfIn Chapter 8 you were introduced to the water-soluble vitamins- includ (1).pdf
In Chapter 8 you were introduced to the water-soluble vitamins- includ (1).pdf
ColinjSWDavidsonn
 
In Chapter 12- you learned about the distribution and marketing channe.pdf
In Chapter 12- you learned about the distribution and marketing channe.pdfIn Chapter 12- you learned about the distribution and marketing channe.pdf
In Chapter 12- you learned about the distribution and marketing channe.pdf
ColinjSWDavidsonn
 
In detail- please discuss the technical structure of the Customs Tarif.pdf
In detail- please discuss the technical structure of the Customs Tarif.pdfIn detail- please discuss the technical structure of the Customs Tarif.pdf
In detail- please discuss the technical structure of the Customs Tarif.pdf
ColinjSWDavidsonn
 
In an experiment of rolling a die twce Lel x be random variable to be.pdf
In an experiment of rolling a die twce Lel x be random variable to be.pdfIn an experiment of rolling a die twce Lel x be random variable to be.pdf
In an experiment of rolling a die twce Lel x be random variable to be.pdf
ColinjSWDavidsonn
 
In a school- 16- of the students have seen a school counselor about an.pdf
In a school- 16- of the students have seen a school counselor about an.pdfIn a school- 16- of the students have seen a school counselor about an.pdf
In a school- 16- of the students have seen a school counselor about an.pdf
ColinjSWDavidsonn
 
In a Poisson distribution- -2-00- (Round your answers to 4 decimal pla.pdf
In a Poisson distribution- -2-00- (Round your answers to 4 decimal pla.pdfIn a Poisson distribution- -2-00- (Round your answers to 4 decimal pla.pdf
In a Poisson distribution- -2-00- (Round your answers to 4 decimal pla.pdf
ColinjSWDavidsonn
 
It is a simple program that that parses a simple expression grammar- T.pdf
It is a simple program that that parses a simple expression grammar- T.pdfIt is a simple program that that parses a simple expression grammar- T.pdf
It is a simple program that that parses a simple expression grammar- T.pdf
ColinjSWDavidsonn
 
it ingents ford It tacks cell watlls Question 4 Bictaterally symimetri.pdf
it ingents ford It tacks cell watlls Question 4 Bictaterally symimetri.pdfit ingents ford It tacks cell watlls Question 4 Bictaterally symimetri.pdf
it ingents ford It tacks cell watlls Question 4 Bictaterally symimetri.pdf
ColinjSWDavidsonn
 
Is this x-lined dominant or recessive inheritance- Write all possible.pdf
Is this x-lined dominant or recessive inheritance- Write all possible.pdfIs this x-lined dominant or recessive inheritance- Write all possible.pdf
Is this x-lined dominant or recessive inheritance- Write all possible.pdf
ColinjSWDavidsonn
 
Is the study experimental- observational- or niether- 7) A political p.pdf
Is the study experimental- observational- or niether- 7) A political p.pdfIs the study experimental- observational- or niether- 7) A political p.pdf
Is the study experimental- observational- or niether- 7) A political p.pdf
ColinjSWDavidsonn
 
Is Ethnicity a Foreign Concept-.pdf
Is Ethnicity a Foreign Concept-.pdfIs Ethnicity a Foreign Concept-.pdf
Is Ethnicity a Foreign Concept-.pdf
ColinjSWDavidsonn
 
is arguably the most important factor currently shaping the world econ.pdf
is arguably the most important factor currently shaping the world econ.pdfis arguably the most important factor currently shaping the world econ.pdf
is arguably the most important factor currently shaping the world econ.pdf
ColinjSWDavidsonn
 
Introduction to Parallel Computing Assignment.pdf
Introduction to Parallel Computing  Assignment.pdfIntroduction to Parallel Computing  Assignment.pdf
Introduction to Parallel Computing Assignment.pdf
ColinjSWDavidsonn
 
Interrelationships of the financial statements- please in your own wor.pdf
Interrelationships of the financial statements- please in your own wor.pdfInterrelationships of the financial statements- please in your own wor.pdf
Interrelationships of the financial statements- please in your own wor.pdf
ColinjSWDavidsonn
 
Internal users of accounting information would not include A- officers.pdf
Internal users of accounting information would not include A- officers.pdfInternal users of accounting information would not include A- officers.pdf
Internal users of accounting information would not include A- officers.pdf
ColinjSWDavidsonn
 
int a-0- for {i-0-i-N-i++){ for (j-N-j-i-j){ }a-a+i+j- -} T(n)-.pdf
int a-0- for {i-0-i-N-i++){ for (j-N-j-i-j){ }a-a+i+j- -} T(n)-.pdfint a-0- for {i-0-i-N-i++){ for (j-N-j-i-j){ }a-a+i+j- -} T(n)-.pdf
int a-0- for {i-0-i-N-i++){ for (j-N-j-i-j){ }a-a+i+j- -} T(n)-.pdf
ColinjSWDavidsonn
 
Insurance protects and safeguards assets from the financial effects of.pdf
Insurance protects and safeguards assets from the financial effects of.pdfInsurance protects and safeguards assets from the financial effects of.pdf
Insurance protects and safeguards assets from the financial effects of.pdf
ColinjSWDavidsonn
 
Insulin (a peptide hormone) stimulates the uptake glucose blood by act.pdf
Insulin (a peptide hormone) stimulates the uptake glucose blood by act.pdfInsulin (a peptide hormone) stimulates the uptake glucose blood by act.pdf
Insulin (a peptide hormone) stimulates the uptake glucose blood by act.pdf
ColinjSWDavidsonn
 
INSTRuctions- Rost the fellewing jeurnal entries te the ledrer account.pdf
INSTRuctions- Rost the fellewing jeurnal entries te the ledrer account.pdfINSTRuctions- Rost the fellewing jeurnal entries te the ledrer account.pdf
INSTRuctions- Rost the fellewing jeurnal entries te the ledrer account.pdf
ColinjSWDavidsonn
 
Insert a VLOOKUP function in cell C5 to display the ring cos for the f.pdf
Insert a VLOOKUP function in cell C5 to display the ring cos for the f.pdfInsert a VLOOKUP function in cell C5 to display the ring cos for the f.pdf
Insert a VLOOKUP function in cell C5 to display the ring cos for the f.pdf
ColinjSWDavidsonn
 

More from ColinjSWDavidsonn (20)

In Chapter 8 you were introduced to the water-soluble vitamins- includ (1).pdf
In Chapter 8 you were introduced to the water-soluble vitamins- includ (1).pdfIn Chapter 8 you were introduced to the water-soluble vitamins- includ (1).pdf
In Chapter 8 you were introduced to the water-soluble vitamins- includ (1).pdf
 
In Chapter 12- you learned about the distribution and marketing channe.pdf
In Chapter 12- you learned about the distribution and marketing channe.pdfIn Chapter 12- you learned about the distribution and marketing channe.pdf
In Chapter 12- you learned about the distribution and marketing channe.pdf
 
In detail- please discuss the technical structure of the Customs Tarif.pdf
In detail- please discuss the technical structure of the Customs Tarif.pdfIn detail- please discuss the technical structure of the Customs Tarif.pdf
In detail- please discuss the technical structure of the Customs Tarif.pdf
 
In an experiment of rolling a die twce Lel x be random variable to be.pdf
In an experiment of rolling a die twce Lel x be random variable to be.pdfIn an experiment of rolling a die twce Lel x be random variable to be.pdf
In an experiment of rolling a die twce Lel x be random variable to be.pdf
 
In a school- 16- of the students have seen a school counselor about an.pdf
In a school- 16- of the students have seen a school counselor about an.pdfIn a school- 16- of the students have seen a school counselor about an.pdf
In a school- 16- of the students have seen a school counselor about an.pdf
 
In a Poisson distribution- -2-00- (Round your answers to 4 decimal pla.pdf
In a Poisson distribution- -2-00- (Round your answers to 4 decimal pla.pdfIn a Poisson distribution- -2-00- (Round your answers to 4 decimal pla.pdf
In a Poisson distribution- -2-00- (Round your answers to 4 decimal pla.pdf
 
It is a simple program that that parses a simple expression grammar- T.pdf
It is a simple program that that parses a simple expression grammar- T.pdfIt is a simple program that that parses a simple expression grammar- T.pdf
It is a simple program that that parses a simple expression grammar- T.pdf
 
it ingents ford It tacks cell watlls Question 4 Bictaterally symimetri.pdf
it ingents ford It tacks cell watlls Question 4 Bictaterally symimetri.pdfit ingents ford It tacks cell watlls Question 4 Bictaterally symimetri.pdf
it ingents ford It tacks cell watlls Question 4 Bictaterally symimetri.pdf
 
Is this x-lined dominant or recessive inheritance- Write all possible.pdf
Is this x-lined dominant or recessive inheritance- Write all possible.pdfIs this x-lined dominant or recessive inheritance- Write all possible.pdf
Is this x-lined dominant or recessive inheritance- Write all possible.pdf
 
Is the study experimental- observational- or niether- 7) A political p.pdf
Is the study experimental- observational- or niether- 7) A political p.pdfIs the study experimental- observational- or niether- 7) A political p.pdf
Is the study experimental- observational- or niether- 7) A political p.pdf
 
Is Ethnicity a Foreign Concept-.pdf
Is Ethnicity a Foreign Concept-.pdfIs Ethnicity a Foreign Concept-.pdf
Is Ethnicity a Foreign Concept-.pdf
 
is arguably the most important factor currently shaping the world econ.pdf
is arguably the most important factor currently shaping the world econ.pdfis arguably the most important factor currently shaping the world econ.pdf
is arguably the most important factor currently shaping the world econ.pdf
 
Introduction to Parallel Computing Assignment.pdf
Introduction to Parallel Computing  Assignment.pdfIntroduction to Parallel Computing  Assignment.pdf
Introduction to Parallel Computing Assignment.pdf
 
Interrelationships of the financial statements- please in your own wor.pdf
Interrelationships of the financial statements- please in your own wor.pdfInterrelationships of the financial statements- please in your own wor.pdf
Interrelationships of the financial statements- please in your own wor.pdf
 
Internal users of accounting information would not include A- officers.pdf
Internal users of accounting information would not include A- officers.pdfInternal users of accounting information would not include A- officers.pdf
Internal users of accounting information would not include A- officers.pdf
 
int a-0- for {i-0-i-N-i++){ for (j-N-j-i-j){ }a-a+i+j- -} T(n)-.pdf
int a-0- for {i-0-i-N-i++){ for (j-N-j-i-j){ }a-a+i+j- -} T(n)-.pdfint a-0- for {i-0-i-N-i++){ for (j-N-j-i-j){ }a-a+i+j- -} T(n)-.pdf
int a-0- for {i-0-i-N-i++){ for (j-N-j-i-j){ }a-a+i+j- -} T(n)-.pdf
 
Insurance protects and safeguards assets from the financial effects of.pdf
Insurance protects and safeguards assets from the financial effects of.pdfInsurance protects and safeguards assets from the financial effects of.pdf
Insurance protects and safeguards assets from the financial effects of.pdf
 
Insulin (a peptide hormone) stimulates the uptake glucose blood by act.pdf
Insulin (a peptide hormone) stimulates the uptake glucose blood by act.pdfInsulin (a peptide hormone) stimulates the uptake glucose blood by act.pdf
Insulin (a peptide hormone) stimulates the uptake glucose blood by act.pdf
 
INSTRuctions- Rost the fellewing jeurnal entries te the ledrer account.pdf
INSTRuctions- Rost the fellewing jeurnal entries te the ledrer account.pdfINSTRuctions- Rost the fellewing jeurnal entries te the ledrer account.pdf
INSTRuctions- Rost the fellewing jeurnal entries te the ledrer account.pdf
 
Insert a VLOOKUP function in cell C5 to display the ring cos for the f.pdf
Insert a VLOOKUP function in cell C5 to display the ring cos for the f.pdfInsert a VLOOKUP function in cell C5 to display the ring cos for the f.pdf
Insert a VLOOKUP function in cell C5 to display the ring cos for the f.pdf
 

Recently uploaded

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 

Recently uploaded (20)

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 

In Python- A palindrome is a word or a phrase that is the same when re.pdf

  • 1. In Python: 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. Input: Bob output: palindrome: bob output: not a palindrome: bobby input: dr awkward output: not a palindrome: dr awkward here is my code but it is not removing the white spaces from the string. Could you please tell me why