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
Describe 6 difference of the types of computer<br>​
Trava [24]

Answer:

<h3>1. Supercomputer</h3>

One of types of computers is supercomputer. It is a computer that is at the front-line of current processing capacity, particularly speed of calculation. It is usually used to do tasks involving intense numerical calculations such as weather forecasting, fluid dynamics, nuclear simulations, theoretical astrophysics, and complex scientific computations

<h3>2. Mainframe Computer</h3>

Another computer type is mainframe computer. It is a computer that is capable of handling and processing very large amounts of data quickly. Its calculation speed can reach millions to tens of millions instructions per second (MIPS) and it can respond to hundreds of millions of users at a time.

This computer type is mainly used in large institutions such as government, banks and large corporations.

<h3>3. Minicomputer (Mid-Range Computer)</h3>

Minicomputers are a class of multi-user computers that lie in the middle range of the computing spectrum, in between the smallest mainframe computers and the largest single-user systems (microcomputers or personal computers).

Minicomputers are usually small in scale, simple in structure, easy to maintain, and low in cost. Therefore, they are often used in universities, scientific research institutions and industrial control fields.

<h3>4. Microcomputer (Personal Computer)</h3>

The term “microcomputer” was introduced with the advent of systems based on single chip microprocessors. In the early days, the microcomputers would still have been too expensive to be owned by a single individual. But in the late 20th century, microcomputers became the most common type of computer.

Therefore, the term "microcomputer" has practically become an anachronism and has been replaced the term "personal computer (PC)".

Personal computer has developed rapidly because of its small size, convenient use, low production cost, and low price. PC computing speed can reach hundreds of thousands to millions instructions per second, which can meet the requirements of data processing and scientific computing in production, scientific research, and life.

<h3>5. Workstation Computer</h3>

A workstation computer is a high-end personal computer between microcomputers and minicomputers. It is usually equipped with large-capacity memory, external storage, and large-screen displays. Therefore, it has strong data processing capabilities and graphics processing capabilities.

Workstation computers are designed and developed mainly for professional application fields like engineering design, animation production, scientific research, software development, financial management, information services, analog simulation, etc.

<h3>6. Server Computer</h3>

A server refers to a high-performance computer that provides shared information resources and various services for many users on the network at the same time in a network environment.

A server is expected to be capable of high-speed computing, long-term reliable operation (it features error-correction of RAM; redundant cooling; self-monitoring, RAID), and powerful external data throughput.

The structure of the server is similar to that of an ordinary computer. Many smaller servers are actually personal computers that have been dedicated to provide services for other computers. But they are very different in terms of processing power, stability, reliability, security, scalability, and manageability.

According to the services provided, server computers can be subdivided into database server, file server, Web server, FTP server, etc.

<h2>hope helpful <3</h2>
4 0
3 years ago
Sergio has been asked to make a set of data that was once restricted now available to any users. What data type will Sergio appl
ozzi

The data type Sergio will apply to this set of data that was once restricted to become available to all users is: Public.

A database can be defined as a structured or organized collection of data that are stored on a computer system and usually accessed electronically.

A data type refers to the content of both structured and unstructured data while organizing them into categories based on specific criteria, especially for access or usage, easy retrieval, sorting, and storage by users.

In Computer and technology, the three (3) main data type with respect to restrictions on its access or usage are:

  • Private
  • Protected
  • Public

A public data is typically made up of variables that are visible and accessible to all classes or users.

In conclusion, Sergio should make the data a public data, in order to make them available to all users.

Read more: brainly.com/question/13889633

7 0
3 years ago
Who is this person?<br><br><br> Kaneppeleqw. I see them everywhere. Are they a bot? Are they human?
Effectus [21]
I’m not sure. Maybe a human.
6 0
3 years ago
Which cable between Twisted-Pair-Cable (TPC) and Coaxial-Cable (CC) work for transmitting data to more distances?
sasho [114]

Answer:

TPC is better, according to a website.

Explanation:

5 0
3 years ago
Create a GUI application that allows the user to select a rate category (from a set of radio buttons), and enter the number of m
aniked [119]

Answer:

Kindly note that, you're to replace "at" with shift 2 as the brainly text editor can't take the symbol

Explanation:

Below is the Java Swing implementation of the assignment.

=========================== LongDistance.java ====================================

import java.awt.GridLayout;

import javax.swing.*;

public class LongDistance extends JFrame{

 

  /**

  *

  */

  public static float rate;

  public static float minutes;

  public static float total;

 

  LongDistance(){

     

     

      RatePanel rp = new RatePanel();

     

      MinutesPanel mp = new MinutesPanel();

     

      ButtonsPanel bp = new ButtonsPanel();

     

      this.setLayout(new GridLayout(3, 1));

     

 

     

      this.add(rp);

      this.add(mp);

      this.add(bp);

             

      this.setDefaultCloseOperation(EXIT_ON_CLOSE);

      this.setSize(250, 250);

      this.setVisible(true);

  }

 

}

============================ RatePanel.java ==================================

import java.awt.Dimension;

import java.awt.GridLayout;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import javax.swing.BorderFactory;

import javax.swing.ButtonGroup;

import javax.swing.JPanel;

import javax.swing.JRadioButton;

import javax.swing.border.Border;

public class RatePanel extends JPanel implements ActionListener {

  /**

  *

  */

  private JRadioButton jr1, jr2, jr3;

  RatePanel(){

     

      Border panelBorder = BorderFactory.createTitledBorder("Select a Rate Category");

     

     

      jr1 = new JRadioButton("Daytime ($0.7) per minute");

      jr2 = new JRadioButton("Evening ($0.12) per minute");

      jr3 = new JRadioButton("Off-Peak ($0.05) per minute");

      ButtonGroup bg = new ButtonGroup();

     

      this.setLayout(new GridLayout(3,1));

      this.setBorder(panelBorder);

      this.setPreferredSize(new Dimension(800, 150));

     

      this.add(jr1);

      this.add(jr2);

      this.add(jr3);

     

      bg.add(jr1);

      bg.add(jr2);

      bg.add(jr3);

     

      jr1.addActionListener(this);

      jr2.addActionListener(this);

      jr3.addActionListener(this);

         

  }

  "at"Override

  public void actionPerformed(ActionEvent arg0) {

      // TODO Auto-generated method stub

     

      if(arg0.getSource() == jr1){

          LongDistance.rate = 0.07f;

      }

     

      if(arg0.getSource() == jr2){

          LongDistance.rate = 0.12f;

      }

     

      if(arg0.getSource() == jr3){

          LongDistance.rate = 0.05f;

      }

     

  }

}

=============================== MinutesPanel.java =============================

import java.awt.Dimension;

import java.awt.GridLayout;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import java.awt.event.KeyEvent;

import java.awt.event.KeyListener;

import javax.swing.*;

import javax.swing.border.Border;

import javax.swing.event.DocumentListener;

public class MinutesPanel extends JPanel implements KeyListener{

  JTextField jt;

 

  MinutesPanel(){

      Border panelBorder = BorderFactory.createTitledBorder("Time Of Call");

     

      this.setLayout(new GridLayout(1, 2));

     

      JLabel jl = new JLabel("Minutes: ");

      jt = new JTextField();

     

jt.setBounds(50,50,150,20);

      this.setPreferredSize(new Dimension(10, 10));

      this.setBorder(panelBorder);

      this.add(jl);

      this.add(jt);

     

      jt.addKeyListener(this);

 

     

     

     

  }

  "at"Override

  public void keyPressed(KeyEvent arg0) {

      // TODO Auto-generated method stub

     

  }

  "at"Override

  public void keyReleased(KeyEvent arg0) {

      // TODO Auto-generated method stub

      if(jt.getText() != "")

          LongDistance.minutes = Float.parseFloat(jt.getText());

  }

  "at"Override

  public void keyTyped(KeyEvent arg0) {

      // TODO Auto-generated method stub

     

     

  }

 

}

============================= ButtonsPanel.java ============================

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import javax.swing.JButton;

import javax.swing.JOptionPane;

import javax.swing.JPanel;

public class ButtonsPanel extends JPanel implements ActionListener{

  JButton calculate;

  JButton exit;

  ButtonsPanel(){

      calculate = new JButton("Calculate Charges");

      exit = new JButton("Exit");

     

      this.add(calculate);

      this.add(exit);

     

      calculate.addActionListener(this);

      exit.addActionListener(this);

     

  }

  "at"Override

  public void actionPerformed(ActionEvent arg0) {

      // TODO Auto-generated method stub

     

      if(arg0.getSource() == calculate){

                     

          System.out.println("r " + LongDistance.rate);

          System.out.println("m " + LongDistance.minutes);

         

          LongDistance.total = LongDistance.rate * LongDistance.minutes;

          JOptionPane.showMessageDialog(null, "Total Charges: " +LongDistance.total);

         

      }

     

      if(arg0.getSource() == exit){

          System.exit(0);

      }

  }

}

============================ App.java==============================

public class App {

  public static void main(String[] args) {

     

      LongDistance ld = new LongDistance();

     

  }

}

Check the output below

6 0
4 years ago
Other questions:
  • What inventor patented the first America movie projector
    13·2 answers
  • Server farms such as Google and Yahoo! provide enough compute capacity for the highest request rate of the day. Imagine that mos
    12·1 answer
  • Tom is required to present the activities of his Nature club each month to the school committee. Which presentation element can
    12·2 answers
  • 6 external computer parts that are input
    6·1 answer
  • Write a main program that prompts users for 5 integers. Use two separate functions to return (NOT print) the highest and lowest
    9·1 answer
  • Write a python program to calculate the average of two numbers​
    8·1 answer
  • PLEASE HELP I WILL GIVE BRAINLIEST!!
    8·1 answer
  • What are different ways that celebrities try to connect with fans using the Internet and social media?
    5·1 answer
  • Dana is moving to a new house. She has 15 boxes for books. Each box can hold up to 22 books. Dana has 375 books. How many more b
    10·2 answers
  • Which of the following is a software tool used to manage data for a project in a logical and hierarchical order?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!