The following program includes fictional sets of the top 10 male and female baby names for the current year. Write a program that 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'}

Answers

Answer 1
Answer:

The program analyses a set of male and female names and displays, the combined set of names, specific names and neutral names. The program written in python 3 goes thus :

male_names = {'John', 'Bailey', 'Charlie', 'Chuck', 'Michael', 'Samuel', 'Jayden', 'Aiden', 'Henry', 'Lucas'}

#setofmalenames

female_names = {'Elizabeth', 'Meghan', 'Kim', 'khloe','Bailey', 'Jayden' , 'Aiden', 'Britney', 'Veronica', 'Maria'}

#setoffemalenames

neutral_names = male_names.intersection(female_names)

#names common to both males and females

all_names = male_names.union(female_names)

#set of all baby names ; both male and female

specific_names = male_names.symmetric_difference(female_names)

#name in one set and not in the other

print(all_names)

print(' ')

#leavesaspaceinbetweenthelines

print(specific_names)

print(' ')

print(neutral_names)

Asamplerunoftheprogramisattached.

Learn more :brainly.com/question/9908895

Answer 2
Answer:

Answer:

Please see attachment

Explanation:

Please see attachment


Related Questions

The cost of hiring new employees outpaces the raises for established employees is A. Salary compression B. Occupational based payC. Merit payD. Need for Achievement
A wall in a house contains a single window. The window consists of a single pane of glass whose area is 0.15 m2 and whose thickness is 5 mm. Treat the wall as a slab of the insulating material Styrofoam whose area and thickness are 10 m2 and 0.15 m, respectively. Heat is lost via conduction through the wall and the window. The temperature difference between the inside and outside is the same for the wall and the window. Of the total heat lost by the wall and the window, what is the percentage lost by the window
WHEN A CAR WITH BRIGHT HEADLIGHTS COMES TOWARD YOU AT NIGHT, YOU SHOULD:A. Move toward the right edge of your lane B. Look above the oncoming headlights C. Look below the oncoming headlights D. Look toward the right edge of your lane Help
Imagine you have been asked to find the following object pictured on the left in the accompanying array on the right.RED AND WHITE SQUARES ALL LOOK SIMILARWhat type of search do you think this would be?
FILLIN THE BLANK Buffering is an important op amp application because it solves _____ that can't easily be solved with purely resistive circuits.Group of answer choices

Reduce the following lambda-calculus term to the normalform. Show all intermediate steps, with one beta reduction at a time. In the reduction, assume that you are supplied with extra rules thatallow you to reduce the multiplication of two natural numbers into thecorresponding result.(λf.λx.f(f x))(λy.y≠3) 2

Answers

Answer:

Decrease to typical from utilizing lambda-decrease:  

The given lambda - math terms is, (λf.λx.f(f(fx)))(λy.y×3)2

The of taking the terms is significant in lambda - math,  

For the term, (λy, y×3)2, we can substitute the incentive to the capacity.  

Therefore apply beta-decrease on “(λy, y×3)2,“ will return 2 × 3 = 6  

Presently the tem becomes, (λf λx f(f(fx)))6

The main term, (λf λx f(f(fx))) takes a capacity and a contention and substitute the contention in the capacity.  

Here it is given that it is conceivable to substitute, the subsequent increase in the outcome.  

In this way by applying next level beta - decrease, the term becomes f(f(f(6))), which is in ordinary structure.

Internal and external flow boiling regimes?

Answers

Answer:

The flow boiling is also classified as either external and internal flow boiling depending on whether the fluid is forced to flow over a heated surface or inside a heated channel. The two-phase flow in a tube exhibits different flow boiling regimes, depending on the relative amounts of the liquid and the vapor phases.

Be a qt today lolololololol

Answers

Answer:

you too

Explanation:

thank you for the free points

Write a program to accept a one-line string (maximum of 100 characters) from the keyboard. Edit the string entered in Part 1a (with code that you write) to remove all the white space,digits, punctuation, and other special characters, leaving only the letters. Print out the resulting compressed string to the screen.

Answers

Answer:

// This program is written in C++ programming language

// Comments are used for explanatory purpose

/* The aim of this program is to to remove all the white space,digits, punctuation, and other special characters, leaving only the letters. */

// Program starts here

#include <stdio.h>

#include<iostream>

using namespace std;

int main()

{

// Declare Variable of 100 characters

char word[100];

// Prompt user for input

cout<<"Your input goes here (max, 100 characters)";

cin>>word;

// Iterate through string to check for non alphabetic characters

for (int i = 0; word[i] != '\0'; ++i) {

// Check for uppercase and lowercase letters

while (!((word[i] >= 'a' && word[i] <= 'z') || (word[i] >= 'A' && word[i] <= 'Z') || word[i] == '\0')) {

for (int j = i; word[j] != '\0'; ++j) {

word[j] = word[j + 1];

}

word[j] = '\0';

}

}

cout<<"The resulting compressed string: "<<word;

return 0;

}

Answer:

w = str(input("input your values: "))

values = ' '.join(filter(str.isalpha, w))

while len(w) < 100:

       print(values)

       break

Explanation:

The code is written in python

w = str(input("input your values: "))

This code ask the user to input any string values with characters, numbers, line spaces , letters etc.

values = ' '.join(filter(str.isalpha, w))

This code filters the inputted value to bring only letters. All the letter are then joined together

while len(w) < 100:

The code check if the inputted value is less than 100 characters. While it is less than 100 characters. If it is less than 100 character the next code will function.

print(values)

This code prints the joined letters after checking with  a while loop to confirm the length of character is less than 100

break

The break function breaks the code whether it print the values or not.

Generally, the letters will only be printed if the character inputted is less than 100 and later break the while loop or will not print any letter if the character is greater than 100 and later break.

A cube with 1 m on a side is located in the positive x-y-z octant in a Cartesian coordinate system, with one of its points located at the origin. Find the total charge contained in the cube if the charge is given by p_v = x^2 ye^-z mC/m^3

Answers

Answer:

4.61 mC

Explanation:

The cube has 1 m side in the positive x-y-z octant in a Cartesian coordinate system, with one of its points located at the origin. The charge density is given as:

\rho_v=x^2ye^(-z) \ mC/m^3

Charge density is the charge per unit length or area or volume. It is the amount of charge in a particular region.

The charge Q is given as:

Q=\int\limits_v {\rho_v} \, dv  \nQ=\int\limits_v {\rho_v} \, dv=\int\limits^2_(x=0)\int\limits^2_(y=0)\int\limits^2_(z=0) {x^2ye^(-z)} \, dxdydz\n

Q=\int\limits^2_(x=0) {x^2} \, dx \int\limits^2_(y=0) {y} \, dy \int\limits^2_(z=0) {e^(-z)} \, dz \n\nQ=((1)/(3) [x^3]^2_0)((1)/(2) [y^2]^2_0)(-1 [e^(-z)]^2_0)\n\nQ=(-1)/(6) ([x^3]^2_0)( [y^2]^2_0)( [e^(-z)]^2_0)\n\nQ=(-1)/(6)[2^3-0^3][2^2-0^2][e^(-2)-e^0]\n\nQ=(-1)/(6)(8)(4)(0.1353-1)=(-1)/(6)(8)(4)(-0.8647)\n\nQ=4.61\ mC

A bathroom scale uses four internal strain gauges to measure the displacement of its diaphragm as a means for determining load. Four active gauges are used in a bridge circuit. The gauge factor is 2, and the gauge resistance is 120 Ω for each gauge. If an applied load to the diaphragm causes a tensile strain on R1 and R4 of 40 x 10-6, while gauges R2 and R3 experience a compressive strain of 40 x 10-6, estimate the bridge deflection voltage. The supply voltage is 5 V. a,b,c or d? a.400 x 10-6 V



b.600x10-6V



c.800x10-6V



d.1000 x 10-6 V

Answers

Answer:

a.400 x 10-6 V

Explanation:

Kindly check the attached image below to see the step by step explanation to the question above.