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]
4 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]4 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
Write any three primary activities of a program??​
katrin2010 [14]

Answer:

Input, Processing, and Output

Explanation:

Hope it helps you..

Your welcome in advance..

(◍•ᴗ•◍)

4 0
3 years ago
X = 10<br> y = 20<br> x &gt; y<br> print("if statement")<br> print("else statement")
Eduardwww [97]
I dont really understand what you want to do but im gonna answer it as if I understood it.

If x is 10 and y is 20 then y is larger than x
8 0
3 years ago
Cuantos actos ay en el mito de aracne
mash [69]

Answer:

En el mito de Aracne hay un acto, que se desarrolla con cinco escenas.

Explanation:

En el mito de Aracne hay un solo acto, que se desarrolla con cinco escenas. En este mito, la joven Aracne es muy hábil tejiendo, tanto así se enorgullece de su talento que se compara y se considera mejor que la diosa Atenea. Esto último ofende a la divinidad, que le advierte sobre su egocentrismo, lo que lleva a que ambas mujeres participen en una competencia. Aracne demuestra ser muy hábil pero irrespetuosa, lo que hace enfadar a la diosa. Al final, la joven se da cuenta de su error y se ahorca, pero Atenea se apiada de ella y la transforma en una araña.

6 0
4 years ago
Advantages &amp; Disadvantages of flow chart​
viktelen [127]

Answer:

Advantages of flow charts:

1. Communication where flowcharts are a more effective technique of explaining a system's rationale to all parties involved.

2. Efficient interpretation by using a flowchart, a problem can be investigated more effectively, resulting in lower costs and less time wasted.

3. Appropriate documentation such when program flowcharts serve as good documentary evidence, that is required for a variety of objectives, allowing things to run more smoothly.

4. Effective Coding where during the systems analysis and software development phases, the flowcharts serve as a guide or blueprint.

5. Practical Debug where the flowchart assists with the debugging process.

6. Efficient Program Maintenance by using a flowchart, it is simple to maintain an operational program. It allows the programmer to focus his efforts more effectively on that section.

Disadvantages of flow charts:

1. Manual traceability is required to ensure the accuracy of the flowchart drawn on paper.

2. Simple changes to the problem reasoning may necessitate a complete redo of the flowchart.

3. Displaying many branches and looping in flowchart is challenging.

4. When dealing with a complicated project or algorithm, the flowchart becomes very challenging and imprecise.

5. It can take some time to modify a flowchart.

3 0
2 years ago
If you see someone harassing someone else online you should ​
Sever21 [200]

Try to say something yourself, but if you are too scared, get an adult involved. The one bad thing you could do is ignore it.

4 0
4 years ago
Read 2 more answers
Other questions:
  • You have a website that sells widgets, and you have a category page specifically for blue widgets. After some extensive outreach
    5·1 answer
  • why backupdocs.com keeps giving computer system update with regards to pdf documents savings? #backupdocuments
    6·1 answer
  • Can someone please help with two? I will mark brainlest!!!
    12·1 answer
  • 1. Write a program that grades arithmetic quizzes as follows: (4 points) a. Assume there are 23 questions in the quiz. b. Ask th
    10·1 answer
  • Which tab should you choose to add a picture from a file to your presentation?
    8·1 answer
  • What effect does screen resolution have on how graphics are displayed?
    7·1 answer
  • Melinda completed the Computer Programming Aptitude Test when she applied for a position with Beta Electronics. Six months later
    14·1 answer
  • In 2 or 3 sentences, describe one advanced stradegy and how its useful
    11·1 answer
  • ILL GIVE BRAINLIEST TO FIRST ANSWER David is adopting an iOS app from a non-retina screen to a retina screen. The app currently
    13·1 answer
  • What are three major events in computer science history?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!