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
Which stage of the waterfall model is most like the simple model's stage 5?
Tema [17]
Maintenance, Output requirements, Forking. This one is tricky because one would think "input", but everything that is inputted must be outputted, so they are combined. The simple model of development. It's pretty self explanatory. Communications between programmers who are working on related features. Version control is all about communication--- so this is the most logical option. Even though "The features that are currently being development. 
8 0
3 years ago
Can you list one property of each of the following?<br> Excel<br> Word<br> Powerpoint
Rudiy27
Exel is used for graphing, Word for any type of essay or paper, and Powerpoint for presentations.
Hope this helps!
4 0
3 years ago
Read 2 more answers
What is the difference, if any, between a Portable Media Player (PMP) and a Digital Media Device (DMD)? PMPs can be analog or di
lara [203]

Answer:

PMPs are typically referred to interchangeably.

Explanation:

3 0
3 years ago
If you want to create header, clicker the add a header button on the ___ tab
Finger [1]
On the insert tab
------------------------
6 0
3 years ago
By 1955, half of all U.S. households ________ had access to the internet. had satellite radio in at least one car. owned at leas
storchak [24]

Answer:

Owned at least one television.

Explanation:

Part among most of the U.S. families with at least 1 TV had internet connection in the year 1955.

Average American invests between two and a part to nearly several times in a day enjoying tv, based on the study as well as the period of the year. This was never only critical that such a period should be expended on tv however that it remains not wasted on other things, including studying or hanging out or making friends.

8 0
4 years ago
Other questions:
  • Which is the last step in conducting a url research
    11·1 answer
  • Let PALINDROME_DFA= | M is a DFA, and for all s ∈ L(M), s is a palindrome}. Show that PALINDROME_DFA ∈ P by providing an algorit
    5·1 answer
  • Which one of the following analog VOM ranges would be selected to measure a DC current of 90 milliamps? A. 10A B. 10mA C. 100mA
    5·1 answer
  • 1. Define what grasslands are ?
    14·2 answers
  • Which data type is 2.5?
    5·1 answer
  • Consider the following code segment.
    11·1 answer
  • Stacy is in the process of creating a storyboard for her personal website, but she is unable to decide which storyboarding techn
    13·1 answer
  • Which statement about the Weather Bar in the Outlook calendar is true?
    12·1 answer
  • What is an insertion point?
    6·1 answer
  • Which computer language uses short words known as mnemonics for writing programs?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!