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
A desperate employee calls because she has accidentally deleted crucial files from her hard drive and can’t retrieve them from t
konstantin123 [22]

Answer: The file may have been lost due to incompatibility with the operating system, inadequate space on the hard disk drive, or through corruption of the recycle bin.

However, I will have to ask her the following questions:

- name of operating system she is utilizing,

- the time of deletion of files,

- the kind or extension of the deleted file,

- the model number of the computer,

- the size of files created after the deletion of files.

Also, sometimes, deleted files could be irretrievable due to security breeches. The employee may not have the required access to the crucial file but accidentally stumble upon it.

After all of these have been determined, then the error is fixed, and the document/file is restored, and becomes accessible to the employee.

6 0
3 years ago
class student_record { public: int age; string name; double gpa; }; Implement a void function that has five formal parameters: a
Setler79 [48]

Answer:

void delete_record(student_record *arr, int &size, int age, string name, double gpa) {

int index = -1;

if (arr != NULL && size > 0) {

for (int i = 0; i < size; ++i) {

if (arr[i].age == age && arr[i].name == name && arr[i].gpa == gpa) {

index = i;

break;

}

}

}

if (index != -1) {

for (int i = index; i < size - 1; ++i) {

arr[i] = arr[i + 1];

}

size--;

}

}

8 0
3 years ago
ou have a company network that is connected to the internet. You want all users to have internet access, but you need to protect
Rus_ich [418]

Server and network is 2 different things, just put the server on a different network.  ;) duh

Explanation:

4 0
3 years ago
Which domain of an IT infrastructure primarily includes the processes and procedures that end users use to remotely access an or
Natalka [10]

Answer:

The answer is "Remote Domain Access".

Explanation:

It is also known as web access, it is an opportunity to moderately access a desktop or network over a connection to the internet. It also allows you to download the structures, that want even if they are not mentally and emotionally able to communicate specifically.

  • In other words, it uses a satellite for interaction or internet service, and users can access systems remotely.
  • It is also used in the database, that's why it is the correct answer.
6 0
3 years ago
What is Activation code for wwe 2k20 ​
Arte-miy333 [17]
Shouldn’t you get that in your email when you sign up.
5 0
3 years ago
Read 2 more answers
Other questions:
  • how do you set up a slide show to play continuously, advancing through all slides without requiring your interaction? A. Click S
    9·1 answer
  • When uninstalling software, it is best to delete the folder containing the software?
    11·1 answer
  • Which step creates a connection between a file and a program in python?
    10·1 answer
  • CPU BENCHMARKS are measurements used to compare performance between processors
    9·1 answer
  • What is the difference between the web and the internet?
    14·1 answer
  • How to find the average range of cells A1:A10
    14·1 answer
  • How does the Problem-solving Process help us to solve everyday Problems?
    13·1 answer
  • Which graphic file format is used for commercial purposes.
    10·1 answer
  • A short-range wireless network is called:
    10·1 answer
  • Imagine that your parents were starting a small business, and they wanted to upgrade their data storage. Would you recommend a f
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!