Question: Write code that will ask the user for two words and determine if the two words are anagrams or palindromes. Anagrams are words that have
Write code that will ask the user for two words and determine if the two words are anagrams or palindromes. Anagrams are words that have the same letters, but in different ordering. Palindromes are words that read the same forwards and backwards. For example:
won, now
Are anagrams and palindromes
scare, cares
Are anagrams but not palindromes
Write a function that takes in two strings and determines if they are palindromes andor anagrams. The function should return a list of Boolean values:
True True if it is both a palindrome and an anagram
True False if it is a palindrome but not an anagram
False True if it is not a palindrome, but it is an anagram
False False if it is neither a palindrome nor an anagram
Then write code to ask the user for two words and call your function. Print the results in the following format:
"The words areare not palindromes"
"The words areare not anagrams"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
