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]
2 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]2 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
Average of Grades - Write a program that stores the following values in five different variables: 98, 87, 84, 100, 94. The progr
liubo4ka [24]

Answer:

Not sure what language, but in python a super basic version would be:

val1 = 98

val2 = 87

val3 = 84

val4 = 100

val5 = 94

sum = val1 + val2 + val3 + val4 + val5

avg = sum / 5

print(avg)

Explanation:

4 0
3 years ago
If you could own a large technology Company, which one would it be and why
Lilit [14]
I would own Apple. Because I would be rich and create apple products
6 0
3 years ago
Which agency coordinates the internet's IP addressing and DNS systems?
german
ICANN is the agency which coordinates the internet's IP addressing and DNS systems.

ICANN stands for Internet Corporation for Assigned Names and Numbers. Aside from coordinating the Domain Name System (DNS) and Internet Protocol (IP) addresses, it also coordinates the technical protocol parameters of ARPA top level domain, Internet DNS root zone management (gTLD and ccTLD), allocates Internet number resources, and other services which will fulfill their vision of "one world, one Internet".

The performance of ICAANs services is all under a U.S Government contract.
4 0
2 years ago
An introduction to object-oriented programming.
Scorpion4ik [409]

Answer:

The csharp program is given below.

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

namespace WindowsFormsApplication1

{

   public partial class Form1 : Form

   {

       public Form1()

       {

           InitializeComponent();

      }

       private void button6_Click(object sender, EventArgs e)

       {

           int total = (Convert.ToInt32(textBox1.Text) +  Convert.ToInt32(textBox2.Text) + Convert.ToInt32(textBox3.Text) + Convert.ToInt32(textBox4.Text) + Convert.ToInt32(textBox5.Text));

           int dozen = total / 12;

           int eggs = total % 12;

           textBox6.Text = dozen.ToString();

           textBox7.Text = eggs.ToString();

       }

       private void button7_Click(object sender, EventArgs e)

       {

           textBox1.Text = "";

           textBox2.Text = "";

           textBox3.Text = "";

           textBox4.Text = "";

           textBox5.Text = "";

           textBox6.Text = "";

           textBox7.Text = "";

       }

        private void button8_Click(object sender, EventArgs e)

       {

           Close();

       }

    }

}

Explanation:

1. The integer variables are declared for total eggs, number of dozens and number of eggs.

2. The input of each text box is converted into integer by using the Convert.ToInt32() method on the value of that particular text box.

3. All the inputs are added and the sum is assigned to variable, total.

4. The number of dozens are obtained by dividing total by 12 and assigning the value to the variable, dozen.

5. The number of extra eggs are obtained by taking the modulus of total and 12 and the value is assigned to the variable, eggs.

6. The integer values in the variables, dozen and eggs, are converted into string using the ToString() function with that particular value.

dozen.ToString();

eggs.ToString();

7. The text boxes are assigned the respective values of dozens and number of eggs.

textBox6.Text = dozen.ToString();

textBox7.Text = eggs.ToString();

8. Two additional buttons, clear and exit, are also added.

9. The clear button erases the contents of all the text boxes. The Text property of each textbox is set to “” thereby clearing all the text fields.

10. The exit button closes the application using Close() function.

11. The program is made in visual studio and the output is attached.

3 0
3 years ago
In your own words, explain at least one reason why programming languages have functions.
Nataly [62]
Programming languages have functions because, they are the set of operations that may be applied to objects of that particular class.
for an example I will attach a function, you just check it

brainliest pls

5 0
3 years ago
Other questions:
  • Microsoft Xbox operating system provides Xbox programmers with a set of common standards to use to access controllers, the Kinec
    6·1 answer
  • What does AAC stand for?
    11·2 answers
  • A raised dot (ú) shows where the enter key was pressed. true or false.
    13·1 answer
  • Please refer to the MIPS solution in the question above. How many total instructions are executed during the running of this cod
    10·2 answers
  • What is the most common way for an attacker outside of the system to gain unauthorized access to the target system?
    15·1 answer
  • Which of the following is not considered format?
    8·2 answers
  • Select what's true about Search Engine Companies. Check All That Apply The information contained in a search engine database is
    12·1 answer
  • When compared to defender and analyzer firms, early adopters of new technologies tend to be?
    13·2 answers
  • Need the answer ASAP!!!!!!!!!!!!! I’ll mark brainliest if correct
    8·1 answer
  • Type the numbers 1-50 and then type Computers and Technology twice type it once forward and once backwards.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!