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
Zielflug [23.3K]
3 years ago
13

Write a program that reads whitespace delimited strings (words) and an integer (freq). Then, the program outputs the strings fro

m words that have a frequency equal to freq in a case insensitive manner. Your specific task is to write a function words Frequency(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 words Frequency(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.
Computers and Technology
1 answer:
Lesechka [4]3 years ago
3 0

Answer:

See explaination for the code

Explanation:

def wordsOfFrequency(words, freq):

d = {}

res = []

for i in range(len(words)):

if(words[i].lower() in d):

d[words[i].lower()] = d[words[i].lower()] + 1

else:

d[words[i].lower()] = 1

for word in words:

if d[word.lower()]==freq:

res.append(word)

return res

Note:

First a dictionary is created to keep the count of the lowercase form of each word.

Then, using another for loop, each word count is matched with the freq, if it matches, the word is appended to the result list res.

Finally the res list is appended.

You might be interested in
A programmer has an idea to use just one language for the content, structure, and style of web pages. What might be a problem wi
Juliette [100K]
Doesn’t give the programmer a lot of freedom to be creative. Using only one language on the web limits the amount features the programmer could create.

For example, just only using HTML limits the web page’s features to use scripts like Javascripts.
8 0
2 years ago
To give your app users the ability to open your app directly from other apps by clicking a link, you should use:.
pickupchik [31]
<span>To give your app users the ability to open your app directly from other apps by clicking a link, you should use:  deep link. With the deep link and its URL functionality, existing app users are driven directly inside the mobile app itself. 
</span>Deep links are usually made up of two parts: a scheme (part of the link that identifies which app to open).<span>and a </span>host and path (<span>the unique location in the app where your content exists).</span>

7 0
3 years ago
Which are types of online resources that students can use for help? Check all that apply. simulated labs web-based educational g
Korvikt [17]

Answer:

Simulated Labs

Web-Based Educational Games

Discussion Forums

Explanation:

Did a test with the same question.

3 0
3 years ago
Read 2 more answers
If I write too much for an exam answer, do I get downgraded?
Degger [83]

Answer:

I don't think so

Explanation:

4 0
3 years ago
The purpose of an Internet _____ is to receive packets and send them along towards their final destination.
Bumek [7]

The tool that receives packets and send them along towards their final destination is; Internet Server

<h3>Internet Servers</h3>

We are told that the tool is used to receive packets and send them along towards their final destination.

  • Now, the tool is an internet server because internet servers are softwares and hardwares that make use of HTTP and other protocols to respond to client requests that are made over the World Wide Web.

Now, the main job of an internet server is to display website content through storing, processing and delivering webpages to the final destination.

Read more about internet server at; brainly.com/question/20602197

7 0
3 years ago
Other questions:
  • The acronym is used to define the process that allows multiple devices to share a single routable ip address.
    6·1 answer
  • What is word processing and word wrap?
    5·1 answer
  • 3. Which one of the following statements is correct? _____ variables are those whose storage bindings are created when their dec
    12·1 answer
  • What is a set of best practices that helps an organization to maximize the benefits of an information system, while at the same
    5·1 answer
  • Why we call the standard deviation of the sample statistic asstandard error of the statistic?
    14·1 answer
  • Calvin needs to design a simple yet professional interface for his users. Which option should he implement?
    9·2 answers
  • Which of these is the fastest transmission medium?
    11·2 answers
  • PACIFIC NORTHWEST
    10·1 answer
  • Which of the following describes a recording scout's job in the music industry?
    5·2 answers
  • Write a program that repeatedly reads in integers until a negative integer is read. The program keeps track of the largest integ
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!