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
IceJOKER [234]
3 years ago
6

Write a function named initialMatch that takes a string parameter, text, that contains only lowercase letters and whitespace. Th

e function initialMatch should return a dictionary in which each word in text is a key. The value of each key should be a list of all words in text that satisfy the following three conditions: 1. all words in the list should have the same initial letter as the key 2. no word in the list should appear more than once 3. the key shouldn’t be in the list For example, the following would be correct input and output:
Computers and Technology
1 answer:
Furkat [3]3 years ago
6 0

Answer:

Implementing on Python for the question, the following is the code.

Explanation:

def intialMatch(l):

   word_dict={}

   for word in l.split():

       if word_dict.get(word)==None:

           word_dict[word]=[]

       for key in word_dict.keys():

           if key[0]==word[0] and (word is not key) :

               values = word_dict.get(key)

               if word not in values:

                   values.append(word)

       for key,values in word_dict.items():

           for value in values:

               if value==key:values.remove(value)

   return word_dict

t='do what you can with what you have'

print(intialMatch(t))

You might be interested in
1. Which of the following is not related to a buffer overflow? A. Static buffer overflow B. Index error C. Canonicalization erro
GaryK [48]

Answer: C) Canonicalization error

Explanation:

Canonicalization error is the error or fault that occurs when data is changed into canonical form or standard form that persist different representation.This can create fault when different filenames or structure is assigned to data and canonization cannot take place as it works for simple data representation.

  • Other options are incorrect because static buffer flow is stable writing or reading of data that reaches outside the buffer boundary.Index error is accessing of index by any user that is found beyond the index's list boundary.
  • Heap overflow is the stack gets overlowed outside the boundary while overwriting heap.Thus, the correct option is option(C).
4 0
3 years ago
A Network Intrusion Detection System watches for potentially malicious traffic and _______ when it detects an attack.
serious [3.7K]

A Network Intrusion Detection System watches for potentially malicious traffic and triggers Alert when it detects an attack.

<h3>What is Network Intrusion Detection System?</h3>

Network Intrusion Detection System can be regarded as the security system that helps in detection of potentially malicious traffic and gives notification.

Therefore, Network Intrusion Detection System helps to triggers Alert when it detects an attack.

Learn more about Network Intrusion Detection System at:

brainly.com/question/8118353

6 0
2 years ago
What happens if you have you an image that has 6 bits-per-pixel and you change it to 12
Bingel [31]

Answer:I don't know

Explanation:

6 0
3 years ago
Which composer below was not part of the classical period? <br> A. Beethoven B. Bach<br> C. Mozart
castortr0y [4]

Explanation:

B. Bach

Thanks for your point

3 0
3 years ago
What is the ls option to list entries by lines instead of by columns?​
gogolik [260]

Sometimes I just meet some Unintelligen ppl

7 0
2 years ago
Other questions:
  • 850 cal into joules​
    13·1 answer
  • Jennifer recently bought a new computer to type a new manuscript she’s been working on. She also stored a lot of movies on it to
    10·1 answer
  • What command prompts should be used to assign an IP address to:
    9·1 answer
  • If you have a document that is relevant to more than one folder in your computer what should you do?
    8·1 answer
  • When you touch a hot stove, along which pathway will the impulses travel and what is the final destination in the cns?
    12·1 answer
  • David would like to send a letter to more than one hundred people. He would like the letter to have names and addresses inserted
    12·2 answers
  • Which statement describes how to insert the IF, COUNTIF, or SUM function into a cell?
    11·1 answer
  • Help Me<br><br> What are the four types of graphic models?
    10·1 answer
  • You have imported a library with the birthMonth() function. Based on the API, how many strings are inputed to calculate the birt
    11·1 answer
  • What is the output of this program? age=4 if age &gt;5: print (“more”) else: print (“less”)
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!