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
zavuch27 [327]
2 years ago
9

The following program includes fictional sets of the top 10 male and female baby names for the current year. Write a program tha

t creates: A set all_names that contains all of the top 10 male and all of the top 10 female names. A set neutral_names that contains only names found in both male_names and female_names. A set specific_names that contains only gender specific names. Sample output for all_names: {'Michael', 'Henry', 'Jayden', 'Bailey', 'Lucas', 'Chuck', 'Aiden', 'Khloe', 'Elizabeth', 'Maria', 'Veronica', 'Meghan', 'John', 'Samuel', 'Britney', 'Charlie', 'Kim'}

Engineering
2 answers:
yuradex [85]2 years ago
4 0

Answer:

Please see attachment

Explanation:

Please see attachment

otez555 [7]2 years ago
3 0

Answer:

Define Variables and Use List methods to do the following

Explanation:

#<em>Conjoins two lists together</em>

all_names = male_names.union(female_names)

#<em>Finds the names that appear in both lists, just returns those</em>

neutral_names = male_names.intersection(female_names)

#<em>Returns names that are NOT in both lists</em>

specific_names = male_names.symmetric_difference(female_names)

You might be interested in
A circular ceramic plate that can be modeled as a blackbody is being heated by an electrical heater. The plate is 30 cm in diame
MakcuM [25]

Answer:

Heater power = 425 watts

Explanation:

Detailed explanation and calculation is shown in the image below

6 0
3 years ago
A contractor is planning on including several skylights in each unit of a residential development. What type of worker would she
Sladkaya [172]

Answer:

Glazier

Explanation:

Glaziers are workers who specializes in cutting and installation of glass works.

They work with glass in various surfaces and settings, such as cutting and installing windows and doors, skylights, storefronts, display cases, mirrors, facades, interior walls, etc.

Thus, the type of worker the contractor will hire for this project is a Glazier

8 0
3 years ago
Gray cast iron, with an ultimate tensile strength of 31 ksi and an ultimate compressive strength of 109 ksi, has the following s
suter [353]

Using an appropriate failure theory, find the factor of safety in each case. State the name of the theory that you are using the theory is max stress theory.

<h3>Wat is the max stress theory?</h3>

The most shear strain concept states that the failure or yielding of a ductile fabric will arise whilst the most shear strain of the fabric equals or exceeds the shear strain fee at yield factor withinside the uniaxial tensile test.”

Stress states at various critical locations are f= 2.662.

Read more about strain:

brainly.com/question/6390757

#SPJ1

3 0
2 years ago
How many watts are consumed in a circuit having a power factor of 0. 2 if the input is 100 vac at 4 amperes?.
Anna71 [15]

The watts that are consumed is 80 watts.

<h3>What power factor?</h3>

The term power factor has to do with the measure of the efficiency of the use of energy. Recall that power is defined as the rate of doing work. The magnitude of the power factor shows the extent to which the power is used.

Now, to obtain the watts are consumed in a circuit having a power factor of 0. 2 if the input is 100 vac at 4 amperes we have;  V × I × PF = 100V × 4A × 0.2 = 80 watts.

Learn more about power factor:brainly.com/question/10634193

#SPJ4

6 0
2 years ago
This assignment is designed to test your understanding of graphical user interface components and Event Driven programming in Ja
lys-0071 [83]

Answer:

Java program is given below

Explanation:

JavaPadGUI.java

package javapad.gui;

import java.awt.BorderLayout;

import java.awt.Container;

import java.awt.Dimension;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import java.awt.event.WindowAdapter;

import java.awt.event.WindowEvent;

import java.io.File;

import java.io.FileNotFoundException;

import java.io.PrintWriter;

import java.util.Scanner;

import javax.swing.JButton;

import javax.swing.JFrame;

import javax.swing.JLabel;

import javax.swing.JOptionPane;

import javax.swing.JPanel;

import javax.swing.JScrollPane;

import javax.swing.JTextArea;

public class JavaPadGUI extends JFrame implements ActionListener{

  //constants

  private static final String TITLE = "Macrosoft JavaPad XP";

  private static final String SLOGAN = "Macrosoft: Resistance is futile";

 

  //button names

  private static final String NEW = "New";

  private static final String LOAD = "Load";

  private static final String SAVE = "Save";

  private static final String QUIT = "Quit";

 

  private static final String FILENAME = "hardcode.txt";

  //messages

 

  private static final String QUIT_MSG = "Quitting, Save?";

  private static final String LOAD_ERR = "Could not access file " + FILENAME;

 

 

  //fields

  private JTextArea txtContent;

  private JButton butNew, butLoad, butSave, butQuit;

 

  public JavaPadGUI()

  {

      super(TITLE);

      createUI();

      setSize(new Dimension(400, 300));

      setDefaultCloseOperation(EXIT_ON_CLOSE);

         

  }

 

  private void createUI()

  {

      Container c = getContentPane();

      c.setLayout(new BorderLayout(30,30));

     

      //create the buttons panel

      JPanel butPanel = new JPanel();

      butPanel.add(butNew = new JButton(NEW));

      butPanel.add(butLoad = new JButton(LOAD));

      butPanel.add(butSave = new JButton(SAVE));

      butPanel.add(butQuit = new JButton(QUIT));

     

      //set command names for the buttons, these will be when button is clicked

      butNew.setActionCommand(NEW);

      butLoad.setActionCommand(LOAD);

      butSave.setActionCommand(SAVE);

      butQuit.setActionCommand(QUIT);

     

      JPanel sloganPanel = new JPanel();

      sloganPanel.add(new JLabel(SLOGAN));

     

      //create textarea with scrollbar

      txtContent = new JTextArea(15, 25);

      txtContent.setLineWrap(true);

         

      JScrollPane scroll = new JScrollPane(txtContent);

     

      //now add all components

      c.add(butPanel, BorderLayout.NORTH);

      c.add(scroll, BorderLayout.CENTER);

      c.add(sloganPanel, BorderLayout.SOUTH);

     

     

      //set the actionlistner to buttons to handle button click event

      butNew.addActionListener(this);

      butLoad.addActionListener(this);

      butSave.addActionListener(this);

      butQuit.addActionListener(this);

     

  }

  public void actionPerformed(ActionEvent e)

  {

      String cmd = e.getActionCommand();

      if(cmd.equals(NEW))

          txtContent.setText("");

      else if (cmd.equals(LOAD))

          load();

      else if(cmd.equals(SAVE))

          save();

      else if (cmd.equals(QUIT))

          quit();

  }

  private void quit()

  {

      int option = JOptionPane.showConfirmDialog(this, QUIT_MSG);

      if(option == JOptionPane.YES_OPTION)

      {

          save();

      }

     

      System.exit(0);

  }

 

  private void save()

  {

      try {

          PrintWriter w = new PrintWriter(new File(FILENAME));

          w.write(txtContent.getText());

          w.close();

      } catch (FileNotFoundException e) {

          JOptionPane.showMessageDialog(this,"I/O Error", LOAD_ERR, JOptionPane.ERROR_MESSAGE);

      }

             

  }

  private void load()

  {

      try {

          Scanner s = new Scanner(new File(FILENAME));

          String str = "";

          while(s.hasNextLine())

              str += s.nextLine();

          txtContent.setText(str);

          s.close();

      } catch (FileNotFoundException e) {

          JOptionPane.showMessageDialog(this, LOAD_ERR, "I/O Error",JOptionPane.ERROR_MESSAGE);

      }

     

  }

}

RunJavaPad.java

package javapad;

import javapad.gui.JavaPadGUI;

public class RunJavaPad {

  public static void main(String[] args) {

      JavaPadGUI gui = new JavaPadGUI();

      gui.setVisible(true);

  }

}

7 0
3 years ago
Other questions:
  • A rectangular concrete beam has dimensions b=16 in. and h=30 in. The location of the Gr. 60 reinforcing bars, which are placed a
    15·1 answer
  • An electric current of transports of charge. Calculate the time this took. Be sure your answer has the correct unit symbol and s
    5·1 answer
  • What is a build enviroment in construction
    8·1 answer
  • A type 3 wind turbine has rated wind speed of 13 m/s. Coefficient of performance of this turbine is 0.3. Calculate the rated pow
    12·1 answer
  • What are the weight restrictions for a small UAS, including everything onboard at the time
    12·1 answer
  • How do I calculate the gear ratio​
    6·1 answer
  • ______________ help protect the lower legs and feet from heat hazards like molten metal and welding sparks. A) Safety shoesB) Le
    7·1 answer
  • When determining risk, it is necessary to estimate all routes of exposure in order to determine a total dose (or CDI). Recognizi
    8·1 answer
  • Air enters a compressor operating at steady state at 1.05 bar, 300 K, with a volumetric flow rate of 21 m3/min and exits at 12 b
    11·1 answer
  • Limestone scrubbing is used to remove SO2 in a flue gas desulfurization (FGD) system. Relevant reactions are given below. A lime
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!