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'}

Respuesta :

Answer:

Please see attachment

Explanation:

Please see attachment

Ver imagen msakhile
fichoh

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'}

#set of male names

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

#set of female names

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(' ')

#leaves a space inbetween the lines

print(specific_names)

print(' ')

print(neutral_names)

A sample run of the program is attached.

Learn more :https://brainly.com/question/9908895

Ver imagen fichoh