Please write a function named palindromes, which takes a string argument and returns True if the string is a palindrome. Palindromes are words which are spelled exactly the same backwards and forwards. Please also write a main function which asks the user to type in words until they type in a palindrome: Please type in a palindrome: python that wasn't a palindrome Please type in a palindrome: java that wasn't a palindrome Please type in a palindrome: oddoreven that wasn't a palindrome Please type in a palindrome: neveroddoreven neveroddoreven is a palindrome! NB:, the main function should not be within an if name Sample output _main__": block

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 23PE
icon
Related questions
Question

Can you use Python programming language to to this question?

Thanks

Please write a function named palindromes, which takes a string argument and returns
True if the string is a palindrome. Palindromes are words which are spelled exactly the
same backwards and forwards.
Please also write a main function which asks the user to type in words until they type in a
palindrome:
Please type in a palindrome: python
that wasn't a palindrome
Please type in a palindrome: java
that wasn't a palindrome
Please type in a palindrome: oddoreven
that wasn't a palindrome
Please type in a palindrome: neveroddoreven
neveroddoreven is a palindrome!
NB:, the main function should not be within an if
name
==
Sample output
__main___": block
Transcribed Image Text:Please write a function named palindromes, which takes a string argument and returns True if the string is a palindrome. Palindromes are words which are spelled exactly the same backwards and forwards. Please also write a main function which asks the user to type in words until they type in a palindrome: Please type in a palindrome: python that wasn't a palindrome Please type in a palindrome: java that wasn't a palindrome Please type in a palindrome: oddoreven that wasn't a palindrome Please type in a palindrome: neveroddoreven neveroddoreven is a palindrome! NB:, the main function should not be within an if name == Sample output __main___": block
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning