Answer:
def wordsOfFreqency(words, freq):
text1 = "Apple apPLE mangO aPple orange Orange apple guava Mango mango"
words = []
words1 = []
words1 = text1.split()
words = [x.upper() for x in words1]
freq=[words.count(w) for w in words]
print(dict(zip(freq,words)))
return words
def main():
wordsOfFreqency(words, freq)
if __name__=="__main__":
main() # call main function
Explanation:
This will print the list of strings as per its word frequency.
Output is :
{4: 'APPLE', 3: 'MANGO', 2: 'ORANGE', 1: 'GUAVA'}
Answer:
everything
Explanation:
cuz I use everything and they all work good
Answer:
The loop counts the count() function length of n-1 times with respect to n.
Explanation:
The first and outer loop counts for two times as the variable declared in the condition counts before the iteration is made. The same goes for the other for statements in the source code.
The n represents the number length of a range of numbers or iterables (like an array).
All console programs have a way to prompt for input.
For C#, the answer is Console.ReadLine().
For C, the answer is a.o. fgets()
For C++, the answer could be cin >>
... and so on...
Not sure what answer you need here.