subject

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 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

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
in 2007, floridians died in alcohol-related collisions.a.  501b.  1,051c.  5,015d.  10,839
Answers: 1
question
Computers and Technology, 23.06.2019 06:10
The head restraint should be adjusted so that it reaches a.the top of your ears b.the base of your skull c.the top of the head
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
1. you have a small business that is divided into 3 departments: accounting, sales, and administration. these departments have the following number of devices (computers, printers, etc.): accounting-31, sales-28, and administration-13. using a class c private network, subnet the network so that each department will have their own subnet. you must show/explain how you arrived at your conclusion and also show the following: all available device addresses for each department, the broadcast address for each department, and the network address for each department. also, determine how many "wasted" (not usable) addresses resulted from your subnetting (enumerate them).
Answers: 3
question
Computers and Technology, 24.06.2019 10:00
What did i do wrong with this const discord = require('discord.js'); var bot = new discord.client(); const token = 'ntm3mjcxmtu1mjg3ote2ntq2.dyogew.dpfiwfpuifzuzvifop-csuxasnm' const prefix = "! " bot.registry.registergroup('simple', 'simple'); bot.registry.registerdefaults(); bot.registry. + '/commands'); bot.on('message', message => { if(message.content == 'hi! ') { message.channel.send ('@everyone sup, how is @everyone day going'); } if(message.content == 'h3lp') { message.channel.send ('dose not have any commands yet'); } bot.on('ready', function() { console.log("ready") }); bot.login(token);
Answers: 1
You know the right answer?
Write a function that checks whether two words are anagrams. Two words are anagrams if they contain...
Questions
question
English, 27.10.2021 02:20
question
Mathematics, 27.10.2021 02:20
question
Mathematics, 27.10.2021 02:20
Questions on the website: 13722361