Question: Write a function word_compare that takes two arguments (two strings). There are three possible return cases: Return the string Anagram if the two inputs are


Write a function word_compare that takes two arguments (two strings). There are three possible return cases: Return the string Anagram if the two inputs are anagrams Return a two-tuple (a tuple with two items) if the two inputs are words but not anagrams Return the string Those aren't strings! if either input is not a string. . "tar") >>> word_compare("rat", 'Anagram' >>> word_compare("hello", "goodbye") ('hello', 'goodbye') >>> word_compare (22, "hello") "Those aren't strings!" Modify word_compare to use a default parameter Modify your word_compare method so that the second word uses a default value of "steal". The program should work as before, but should compare the first word to "steal" if no second word is specified
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
