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
We learned that an ideal multiple access protocol has FOUR desirable
Nataly [62]

Answer:

We learned that an ideal multiple access protocol has FOUR desirable

characteristics, describe them.

Explanation:

1.- Very experienced technology and easy to implement.

2.- Rigid resource management and unfit for variable traffic flows.

3.- Requires antenna duplexer for duplex transmission.

<u>Duplex</u> <em>is a term used in telecommunication to define a system that is capable of maintaining two-way communication, sending and receiving messages simultaneously. </em>

4.- Normally FDMA is combined with multiplexing FDD.

<u>FDMA</u> (acronym in English for Frequency Division Multiple Access) <em>is a multiplexing technique used in multiple communication protocols, both digital and analog, mainly radio frequency, and among them in mobile phones of GSM networks. </em>

<u>FDD</u> (Frequency Division Duplexing in English) <em>designates a duplex method in the environment of wireless telecommunications and over certain wired networks.</em>

4 0
3 years ago
Part of preforming routine computer maintenance includes
omeli [17]
Cleaning And tidy cords
7 0
3 years ago
Read 2 more answers
What is the missing line of code? &gt;&gt;&gt;from math th import &gt;&gt;&gt; Point = [1,5) &gt;&gt;&gt; bPoint [4.9]​
Ulleksa [173]

Answer:

I believe import math.

Do let me know if its correct.

3 0
2 years ago
Write a python program that will accept monthly salary amounts greater than zero but less
Naily [24]

Answer:

b=0

c=0

lol=list()

while True:

   salary=input("Enter your salary: ")

   if salary=="e" or salary=="E":

       print("Thankyou!!")

       break

   else:

       a=int(salary)

       if a>=300000 and a<=400000:

            c=c+1

       if a<0 or a>400000:

           print("Your salary is either too small or too big ")

       if a>0 and a<=400000:

           a=a-(25/100*a)-(5/100*a)-(2/100*a)

           lol.append(a)

           b=b+1

           if a>=300000:

                c=c+1

print(lol)

print("The number of salaries entered is: "+ str(b))

print("The number of salaries that exceeded 300000 is: "+str(c))

3 0
3 years ago
Under which reflection(s) is the image of line m also a line?
lubasha [3.4K]

Answer:

c

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • A risk handling technique in which the organization chooses to simply do nothing, as the cost of the risk being actualized is lo
    15·1 answer
  • _____ is a systems development technique that produces a graphical representation of a concept or process that systems developer
    11·1 answer
  • How do optical discs store data? select one:
    15·1 answer
  • What is a collection of computer programs that administer the hardware and software of a computer so that they work properly?
    7·1 answer
  • Free 35 points!!!
    11·2 answers
  • In dynamic programming, the technique of storing the previously calculated values is called A. Saving value property B. Storing
    7·1 answer
  • What is GIGO ?<br>plz answer me​
    7·1 answer
  • What is the median of 6, 16, 9, 20, 45, 30, and 32?<br> A. 9<br> B. 16<br> C. 20<br> D. 22
    7·1 answer
  • A(n) _____ is a computerized system by which subscribers are able to communicate to all other subscribers by sending a transmiss
    5·1 answer
  • Define a function that will return the length of a list
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!