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
When entering new data into your table, which key should you press to move from one field or cell to the next?
prohojiy [21]

Answer:

Tab key or Enter key is the correct answer.

Explanation:

When the user want to move from one cell to another cell or field then they use the tab key or enter key. If the user wants to fill data vertically then, they use Enter key to move one cell to another and id they wants to fill data horizontally then, they use Tab key to move on the next cell. So, that's why when they want to fill data in Row or Column then, they use tab key or enter key.

6 0
3 years ago
An Agile Team decides they want to use pair programming in future Iterations. Where should this be captured? g
Umnica [9.8K]

Answer:

The decision to use pair programming by an Agile Team should be captured in their <em>Inspect and Adapt meeting notes.   </em>

Explanation: The underlying principle for having an agile team that the team is committed to constant incremental and or progressive improvement.

Inspect and Adapt Meeting Notes are notes which hold the summary of past achievements which hold and records of things to do going forward in order to ensure that there is progress and improvement over the last set of objectives.

These notes are usually taken at the Inspect and Adapt meeting. This is simply a meeting held at the end of each project milestone. An agile team during this meeting will review its performance, agree and document how it can be more effective.

Pair programming is also an Agile practice in the parlance of software development. Instead of the regular method where an individual is tasked with the development of an application, in this case, two programmers are tasked with the development of one App.

Sometimes this method is used during Extreme Programming (XP)

Cheers!

7 0
3 years ago
You invested $2,300 in a stock. Your account now has a value of $2,643. Your percentage gain on the investment (rounded to the n
nasty-shy [4]
Your percentage gain on the investment was d)15%

To find percentage increase we subtract original number from new number.
2,643 - 2,300 = 343
Then we divide 343 by 2,300 = .1491
Then you multiply by 100. 
.1491 * 100 = 14.91
It is a 14.91% (rounded) increase.
So the nearest percent out of these options would be 15%.

Hope this helps you! (:
-Hamilton1757
4 0
4 years ago
Read 2 more answers
Complete the sentence. <br><br> The internet is an example of a ______
maria [59]

Answer:

packet switched network

4 0
3 years ago
Write a loop to populate user_guesses with num_guesses integers. read integers using int(input()). ex: if num_guesses is 3 and u
kodGreya [7K]

Answer:

num_guesses = 3  #initialized number of guesses to 3

user_guesses = []  #declared the user_guesses array

guess = 0  #guess variable initialized to 0

print('Enter a number: ')  #prompt telling the user to enter a number

while guess < num_guesses:  #loop capturing input and storing into array

   num = int(input())

   user_guesses.append(num)

   guess = guess + 1

#end of loop

print(user_guesses) #array outputted to user

Explanation:

The above program captures numbers from the user and stores into an array (user_guesses), the length of the array is determined by the value contained in the num_guesses variable, it prints the combined input as an array.

7 0
3 years ago
Read 2 more answers
Other questions:
  • What are the desirable qualities of a Product Vision?
    11·1 answer
  • What is a method whereby new problems are solved based on the solutions from similar cases solved in the past?
    5·1 answer
  • What's the minimum number of ip addresses that a router must have?
    6·1 answer
  • Average of Grades - Write a program that stores the following values in five different variables: 98, 87, 84, 100, 94. The progr
    8·1 answer
  • If you want to adjust the width of a column manually, move your mouse over the _______ column boundary and click and drag until
    9·1 answer
  • Can some please help me learn how to make a program via Binary Code?
    7·1 answer
  • What is the FTC used car rule
    12·1 answer
  • Explica el empleo de cuentas y contraseñas en archivos
    6·1 answer
  • If ClassC is derived from ClassB which is derived from ClassA, this would be an example of ________.
    7·1 answer
  • Write a function called st_dev. st_dev should have one
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!