Find on page
Introduction to Progran x +
File:///C:/Users/zceve/Downloads/Introduction%20to%20Programming%20Using%20Pyhorf%20;1) pof
No results
Options
?
372 of 502
???
ually "bubble" their way to the top and the larger values "sink" to the bottom.
Write a test program that reads in ten numbers, invokes the function, and dis-
displays the sorted numbers.
*10.17 (Anagrams) Write a function that checks whether two words are anagrams.
Two words are anagrams if they contain the same letters. For example, silent
and listen are anagrams. The header of the function is:
def isAnagram(s1, s2):
(Hint: Obtain two lists for the two strings. Sort the lists and check if two lists
are identical.)
Write a test program that prompts the user to enter two strings and, if they
are anagrams, displays is an anagram; otherwise, it displays is not an
anagram.