python programing, Python Programming

Task
(Anagrams) Write a function that checks whether two words are anagrams. Two words are anagrams if they contain the same letters. Fore 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.
Detailed explanation: NO
Posted Date: 10/31/2012 3:41:39 PM | Location : United States







Related Discussions:- python programing, Assignment Help, Ask Question on python programing, Get Answer, Expert's Help, python programing Discussions

Write discussion on python programing
Your posts are moderated
Related Questions
Perimeter of a polygon Now, let's consider the problem of computing the length  of the perimeter of a polygon. The input is a structure of vertices,  encoded as a list of list

Displaying random geometric graphs in an uniform square, unit disk, dense rim unit disk, and uniform sphere

What if you had a list of integer values, and you need to add  them  up and give the sum?  Here are a number of different types of doing  it. First,  here  is a type in a style

what is python

simple program using list

Range Very frequently, we will want to iterate through a list of integer values, often as indices.  Python gives a useful function, range, which gives lists of integers. It ma

Variables We cannot  go very far without variables. A variable is a value related to a name that we can bind  to have a particular value  and  then  later use in an expression.

protocol rdt2.2 considers there is a bit errors between sender to receiver and also from receiver to sender. So now we have to consider checking bit errors introduced in reply from

Worked example 1   Let's examine what  happens when  we compute the following Python code:   def p(x, y): z = x*x - y return z + 1/z   >>> p(1.0, 2.0) -2.0

Write a program that requests a password after the author/program information is displayed. Make the password "hello". The program should then ask the user for their name: if the n