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
Lyrx [107]
3 years ago
15

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'} NOTE: Because sets are unordered, they are printed using the sorted() function here for comparison
Computers and Technology
1 answer:
bazaltina [42]3 years ago
4 0

Answer:

Following are the program in the Python Programming Language.

male_names = {'kay', 'Dev', 'Sam', 'Karan', 'Broly', 'Samuel', 'Jayd', 'Lucifer', 'Amenadiel', 'Anmol'}

female_names = {'Kally', 'Megha', 'Lucy', 'Shally', 'Bailey', 'Jayd', 'Anmol', 'Beth', 'Veronica', 'Sam'}

#initialize the union from male_names and female_names

all_names = male_names.union(female_names)

#Initialize the similar names from male_names and female_names  

neutral_names = male_names.intersection(female_names)

#initialize the symmetric_difference from male_names and female_names

specific_names = male_names.symmetric_difference(female_names)

#print the results

print(sorted(all_names))

print(sorted(neutral_names))

print(sorted(specific_names))

<u>Output</u>:

['Amenadiel', 'Anmol', 'Bailey', 'Beth', 'Broly', 'Dev', 'Jayd', 'Kally', 'Karan', 'Lucifer', 'Lucy', 'Megha', 'Sam', 'Samuel', 'Shally', 'Veronica', 'kay']

['Anmol', 'Jayd', 'Sam']

['Amenadiel', 'Bailey', 'Beth', 'Broly', 'Dev', 'Kally', 'Karan', 'Lucifer', 'Lucy', 'Megha', 'Samuel', 'Shally', 'Veronica','kay']

Explanation:

<u>The following are the description of the program</u>.

  • In the above program, firstly we set two list data type variables 'male_names' and 'female_names' and initialize the male and female names in those variables.
  • Then, we set three variables in which we store union, intersection, and symmetric differences and finally print these three variables in a sorted manner.
You might be interested in
Keisha has been asked to give a presentation about a new method for processing customer returns. The first thing she should do i
SVEN [57.7K]

Answer:

The first thing should Keisha does is determine the purpose of the presentation.

Explanation:

If we are giving any presentation then firstly we should determine the purpose of our presentation.

There are typical reasons for giving any presentation such as:

  • Alerting
  • Persuading
  • Inspiring
  • Enjoyable

By clearly defining the purpose you need to capture the attention of your audience and maintain their interest thoroughly across the oral presentation. Three key elements in any oral presentation process include:

  • Planning
  • Writing
  • Completion

4 0
3 years ago
Using Amdahl’s Law, calculate the speedup gain of an application that has a 60 percent parallel component for (a) two processing
Nina [5.8K]

Answer:

a) Speedup gain is 1.428 times.

b) Speedup gain is 1.81 times.

Explanation:

in order to calculate the speedup again of an application that has a 60 percent parallel component using Anklahls Law is speedup which state that:

t=\frac{1 }{(S + (1- S)/N) }

Where S is the portion of the application that must be performed serially, and N is the number of processing cores.

(a) For N = 2 processing cores, and a 60%, then S = 40% or 0.4

Thus, the speedup is:

t = \frac{1}{(0.4 + (1-0.4)/2)} =1428671

Speedup gain is 1.428 times.

(b) For N = 4 processing cores and a 60%, then S = 40% or 0.4

Thus, the speedup is:

t=\frac{1}{(0.4 + (1-0.4)/4)} = 1.8181

Speedup gain is 1.81 times.

8 0
3 years ago
Use the following scale to rate yourself: (There is no wrong answer
Law Incorporation [45]
Doesnt have any picture
8 0
2 years ago
As Jason walks down the street, a large raven starts squawking at him and flapping its wings. Jason thinks to himself ‘That bird
UNO [17]

Answer:

Answer to the following question is anthropomorphism.

Explanation:

Anthropomorphism is considered as the error in the following context of the scientific reductionism. Anthropomorphize is the source of an error that needs to reconsider.

Anthropomorphism is an attribute of the human qualities, emotions, thoughts, motivation, intentions, and characteristics to the non-living beings or the nonhuman beings, things or objects.

8 0
3 years ago
Which of the following is a way to prevent wastes from contaminating the environment? A) Use absorbent pads to collect floor was
Firlakuza [10]

Answer

Dispose of absorbents as hazardous waste in its own hazardous waste container

Explanation

Hazardous waste is a waste that has chemical composition and properties which makes it capable of causing illness, death  or harm to humans and other life forms when released to the environment without proper management. The characteristics of such wastes include: toxic, ecotoxic, infectious substance, poisonous, explosive and flammability. Hazardous wastes can be destroyed by incineration, chemical process, and temporary on-site waste storage facilities such as waste piles and lagoons/ponds



8 0
3 years ago
Read 2 more answers
Other questions:
  • Maggie is preparing a business report. Which types of keys will she use to type out words and numbers?
    6·2 answers
  • What are the requirements of a data dictionary ?
    7·2 answers
  • Based on the Standards, the statement, "Competition for computer time during periods of high demand had become intense because o
    8·1 answer
  • Compare GBN, SR, and TCP (no delayed ACK). Assume that the timeout values for all three protocols are sufficiently long such tha
    7·1 answer
  • ______ is using material created by others without obtaining permission from the original authors.
    10·2 answers
  • The chip that controls the radio frequency waves within a device
    9·1 answer
  • A(n) ________ is a special value that cannot be mistaken as a member of a list of data items and signals that there are no more
    9·1 answer
  • What is the difference between an internal and an external method call? In what situation would only internal calls be needed?
    11·1 answer
  • How does netbios identify a computer system on the network?
    13·1 answer
  • Place the steps for attaching a file to a message in order from top to bottom.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!