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
Sergio039 [100]
3 years ago
15

8.17 Lab: Strings of a Frequency Write a program that reads whitespace delimited strings (words) and an integer (freq). Then, th

e program outputs the strings from words that have a frequency equal to freq in a case insensitive manner. Your specific task is to write a function wordsOfFreqency(words, freq), which will return a list of strings (in the order in which they appear in the original list) that have a frequency same as the function parameter freq. The parameter words to the function wordsOfFreqency(words, freq) should be a list data structure. If two strings in the list words contain the same sequence of characters but are different case, they are considered the same. For example, we will consider the strings UCONN and uconn to be the same. Test cases 1-4
Computers and Technology
1 answer:
WITCHER [35]3 years ago
4 0

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

You might be interested in
To use Click and type feature can be used to format and enter text graphic and other items
trasher [3.6K]
No more info??? Because I can’t think of how to answer this
6 0
3 years ago
The period of time during which an IDPS monitors network traffic to observe what constitutes normal network behavior is referred
horrorfan [7]

Answer: Training period

Explanation:

The training period is refers to the period of time where we can monitor all the network traffic and also observe all the networking behavior with the constitute.

  • During the training period we get a proper training about the specific topic and also get a chance to learn various types of things.

 According to the given question, in the training period an IDPS monitor is used observing the networking traffic and the network behavior. Therefore, raining period is the correct answer.

 Therefore, Training period is the correct answer.

5 0
3 years ago
A startup is developing a new web browser with a focus on accessibility for visually impaired users. The startup founder is cons
gavmur [86]

Answer:

A license that allows developers to change and share the source

code of the licensed software

Explanation:

i learned this, btw brainly stop removing my answers

7 0
3 years ago
A teacher wants to check the typing proficiency of five students. She gives all of them the same passage to type. Which student
Hitman42 [59]

The student who uses macros for long words. They are most likely to pass words very easily because they have a macro. While not only saving time, also making a stunning performance as macros usually auto correct as well.

5 0
3 years ago
A film company want to video animals in the wild acting naturally. They decide to
erik [133]

Answer:

y

Explanation:

g

5 0
2 years ago
Other questions:
  • Are commonly used to control the number of times that a loop iterates?
    5·1 answer
  • Which option re-scales a worksheet vertically?
    10·1 answer
  • Given half a chance other people at work will take advantage of you
    11·1 answer
  • How would you define media literacy?
    12·1 answer
  • PLZZZZZZZZZZZZZZZ HELP ME OUT!!!!! I SICK AND TIRED OF PEOPLE SKIPING MY QUESTION WHICH IS DUE TODAY PLZ ANSWER ALL OFIT!!!!
    10·1 answer
  • What can you use to make sure that you have no errors in Word Online?
    5·1 answer
  • What is Digital Citizen? It's one of my classes.
    5·1 answer
  • when a picture is downloaded off the internet and then posted to social media, can the social media platform tell it was downloa
    15·1 answer
  • Organizations can face criminal or civil penalties for being ______ in protecting their sensitive data.
    6·2 answers
  • 14. How do digital libraries address the problem of digital exclusion?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!