1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
harkovskaia [24]
3 years ago
13

Write a function that checks whether two words are anagrams. Two words are anagrams if they contain the same letters. For exampl

e, 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 checks whether they are anagrams.

Sample Run 1

Enter a string s1: silent

Enter a string s2: listen

silent and listen are anagrams

Sample Run 2

Enter a string s1: split

Enter a string s2: lisp

split and lisp are not anagrams

Computers and Technology
1 answer:
Masteriza [31]3 years ago
4 0

Answer:

def isAnagram(s1, s2):

   list1=s1

   list2=s2

   sortedlist1 = sorted(list1)

   sortedlist2 = sorted(list2)

   if sortedlist1 == sortedlist2:

       print(list1+ " and "+list2+ " are anagram")

   else:

       print(list1+ " and "+list2+ " are not anagram")

Explanation:

Here is a call to the function isAnagram():

list1 =input("Enter String1 ")

list1 =input("Enter String2 ")

isAnagram(list1,list2)

Attached is the run and output for this program

You might be interested in
PLEASE HELP
Zinaida [17]

Answer:

B from you search question carefully and identify the key word

Explanation:

3 0
3 years ago
Read 2 more answers
​______________________ is a general security term that includes computer​ viruses, worms, and trojan horses.
VashaNatasha [74]
Malware
-------------------
6 0
3 years ago
You would like to conduct a survey and ask your web page visitors to indicate the computer operating systems that they use. Each
Rudiy27

Answer:

<em>A. check box </em>

Explanation:

A check box, selection box, or tick box <em>is a small immersive box that the user can switch to demonstrate an affirmative or negative choice</em>.

It is often observed in applications and operating systems ' HTML input forms, dialog boxes, and GUIs.

A check mark appears inside the box when clicked to signify an affirmative (yes) option. The check mark will vanish when clicking again, suggesting a negative option (no).

6 0
3 years ago
GUYSSS!!!
otez555 [7]
Yea, I don’t think you can fix it unless you backed it up or something somehow...
8 0
3 years ago
Read 2 more answers
When a signal travels across network medium, it signal loses strength the further it gets from the transmitting station, to the
neonofarm [45]

Answer:

Attenuation.

Explanation:

Attenuation means a gradual reduction in the strength of a signal as it moves from station to station which may even cause the receiving station to misinterpret the signal. Any signal can be attenuated - digital or analog.

Attenuation is often caused by weakness, fatigue or passiveness of networking cables and connectors. It could also be caused by noise and long distance.

To get around this, the network device(s) will often resend signals multiple times over just to ensure that at least one of the signals gets there and is interpreted correctly.

3 0
3 years ago
Other questions:
  • Categorize the following relationships into generalization, aggregation, or association. Beware, there may be n-ary associations
    14·1 answer
  • ) The ________ displays a text box and button for users to browse, select, and upload a file. (Points : 3)
    13·1 answer
  • Show what this program prints. Be exact and complete. Can you explain the behavior of each print statement? 1 2 3 4 5 6 7 public
    12·1 answer
  • Write a parent program to fork(2) n processes where n is passed tothe program on the command line, and n can be from 1 to 10. Al
    12·1 answer
  • Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards
    9·1 answer
  • You want to establish the validity of a test designed for computer technicians using a predictive criterion-related validation s
    9·1 answer
  • Create an application that determines the final cost of food items and non-food items, assuming only non-food items are taxed. T
    8·1 answer
  • Which Python expression results in 49?<br><br> 7 * 2<br><br> 7^2<br><br> 7 // 2<br><br> 7 ** 2
    12·2 answers
  • Which of the following statements about ip addresses is true?
    5·1 answer
  • Make The PYTHON Code<br><br> print first 3 character of a string - given "Seattle" expected "Sea"
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!