Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

cannot find comment where beacuse using phone. confuse why less a 0 Write a function called check anagram(a, b) that takes two strings as input

cannot find comment where beacuse using phone. confuse why less a 0 image text in transcribed
image text in transcribed
Write a function called check anagram(a, b) that takes two strings as input and returns True if they are anagrams and False otherwise Two words are anagrams of one another if you can form one word by using exactly the letters in the other word. For example, "struts" and "trusts" are anagrams, but bored" and "robbed" are not A student who completes this exercise should be able to . Treat a String as a sequence of characters For example: Test Result print (check anagram("struts". 'trusts"))True print (check anagram("bored", "robbed")) False Answer (penalty regime 0.10, 20, 30, 40, 50 %) 1 -Idef calculate average(a): sum = 0.0 3 number_of a - float(len(a)) 4for i in range(len(a)): sum += float(a[1]) average = sum / number-of-a 7average - str(round(average, 2)) return average PrecheckCheck Test Expected Got x-calculate average([1]) print(type(x))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

3. Test complex thinking, not just skills and factual knowledge.

Answered: 1 week ago

Question

1. Define mass and mediated communication

Answered: 1 week ago