Answer:
def occurencesOfWords(words,freq):
frequency_dictionary={}
matched_frequency_words=[]
for i in range(len(words)):
counter=1
a=words[i].lower()
for j in range(len(words)):
if(i==j):
continue
b=words[j].lower()
if(a==b):
counter+=1
frequency_dictionary[words[i]]=counter
for key in frequency_dictionary:
if(frequency_dictionary[key]==freq):
matched_frequency_words.append(key)
return matched_frequency_words
if __name__=='__main__':
user_input=input()
freq=int(input())
words=user_input.split(" ");
required_words=occurencesOfWords(words,freq)
for s in required_words:
print(s)
Explanation:
- Inside the occurencesOfWords function, initialize a frequency_dictionary that is used to store the string and the frequency of that specific string
.
- matched_frequency_words is an array that is used to store each string whose frequency matches with the provided frequency
- Run a nested for loop up to the length of words and inside the nested for loop, skip the iteration if both variables i and j are equal as both strings are at same index.
- Increment the counter variable, if two string are equal.
- Loop through the frequency_dictionary to get the matching frequency strings
.
- Finally test the program inside the main function.
Explanation:
There are various basic computer programming languages and one of them is the C language, the base of many computer lanuages.
The code of finding factorial is written below;
CODE
#include<stdio.h>
int main (void)
{
int i,
int factorial =1,
int input;
printf("Enter a number for finding its factorial: ");
scanf("%d",&input);
if (input == 0)
factorial = 0
eles
for ( i =1; I < = input ;i++)
factorial = factorial*i;
printf("Factorial of given %d is: %d",input,factorial);
return 0;
}
Have minor differences in features, logos, & licensing
Answer:
d. All of the above
Explanation:
All the above mentioned statements are true about BitTorrent.
Answer: (D) Account > Property > View
Explanation:
The Account > Property > View is the hierarchical structure of the google analytics account and it this hierarchical stricture basically represent from top to the bottom. The google account basically contain two and more properties for structuring the efficient accounts.
The property of the reporting view contain unique ID and it is the combination of digits and account ID. The view property in the analytic account basically used for access, analyzing and customize the data for viewing in proper way.