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
GREYUIT [131]
3 years ago
10

NAME SEARCH In the Chap07 folder of the Student Sample Programs, you will find the following files: GirlNames.txt—This file cont

ains a list of the 200 most popular names given to girls born in the United States from 2000 through 2009. BoyNames.txt—This file contains a list of the 200 most popular names given to boys born in the United States from 2000 through 2009. Create an application that reads the contents of the two files into two separate arrays or Lists. The user should be able to enter a boy’s name, a girl’s name, or both, and the application should display messages indicating whether the names were among the most popular.
Computers and Technology
1 answer:
Tems11 [23]3 years ago
4 0

Answer:

Explanation:

I do not have the files listed in the question so I have made two test files with the same names. This code is written in Python, we are assuming that the names on each file are separated by newlines.

f1 = open("GirlNames.txt", 'r')

f1_names = f1.read()

f1_names_list = f1_names.split('\n')

f2 = open("BoyNames.txt", 'r')

f2_names = f2.read()

f2_names_list = f2_names.split('\n')

print(f1_names_list)

print(f2_names_list)

boy_or_girl = input("Would you like to enter a boy or girl name or both: ").lower()

if boy_or_girl == 'boy':

   name = input("Enter name: ")

   if name in f2_names_list:

       print("Yes " + name + " is in the list of most popular boy names.")

   else:

       print("No, it is not in the list")

elif boy_or_girl == 'girl':

   name = input("Enter name: ")

   if name in f1_names_list:

       print("Yes " + name + " is in the list of most popular girl names.")

   else:

       print("No, it is not in the list")

elif boy_or_girl == 'both':

   girlname = input("Enter Girl name: ")

   if girlname in f1_names_list:

       print("Yes " + girlname + " is in the list of most popular girl names.")

   else:

       print("No, it is not in the list")

   boyname = input("Enter name: ")

   if boyname in f2_names_list:

       print("Yes " + boyname + " is in the list of most popular girl names.")

   else:

       print("No, it is not in the list")

else:

   print("Wrong input.")

You might be interested in
which endpoint application runs on an endpoint device that only detects an attack in an endpoint device? chqgg
WARRIOR [948]

A host-based intrusion detection system works similarly to a network-based intrusion detection system in that it can monitor and analyze both the internal workings of a computer system and the network packets on its network ports.

<h3>What is Host-Based IPS?</h3>
  • A host-based intrusion detection system works similarly to a network-based intrusion detection system in that it can monitor and analyze both the internal workings of a computer system and the network packets on its network ports.
  • The Host-based Intrusion Prevention System (HIPS) guards against malicious software and other activities that aim to harm your computer. HIPS uses sophisticated behavioral analysis in conjunction with network filtering's detection capabilities to keep track of active programs, files, and registry keys.
  • The integrated endpoint security system known as endpoint detection and response (EDR), also referred to as endpoint threat detection and response (ETDR), combines real-time continuous monitoring and gathering of endpoint data with rules-based automated reaction and analysis capabilities.

To learn more about Host-Based IPS refer to:

brainly.com/question/20490376

#SPJ4

5 0
1 year ago
Is It Safe to Use LinkedIn Automation?
Stolb23 [73]

Answer:

A lot of people have claimed that they lost their full-established accounts after using LinkedIn automation tools. LinkedIn detected the activity and blocked their accounts.  

But it’s not the tool that causes spam, it’s the approach you adopt while using these tools.  

Many people think that LinkedIn automation tools(LinkedCamp) can generate leads magically over the night. They send thousands of connection requests and messages using automation and as a result, LinkedIn detects their activity.  This is not how it works. You need a proper strategy to leverage the potential of these tools. Even the best LinkedIn automation tools cannot guarantee success if you try to overdo the activities.

6 0
3 years ago
Read 2 more answers
is an online collaborative event that may include such features as chat, slideshows, and PowerPoint presentations.
Lilit [14]

Answer

is number 4 or 3

Explanation:

5 0
3 years ago
Which option correctly identifies the expense that will cost you the most when you are living on your own?
larisa86 [58]
Cccccccccccccccccccccc
5 0
3 years ago
Jerry is working at the desk of a client in the marketing department of his company. The client thinks that the problem is the v
Softa [21]

Answer:

E. Check the simple things first to make sure you do not miss anything

Explanation:

This first step is called troubleshooting. As a certified operator, you need to check the simple things first to make sure you don't overlook something in your diagnosis.

The client is fairly certain the problem is from the video card, so after checking the simple things first (troubleshooting) and see no problems, then you can check the video card of the computer.

The reason it is advisable to troubleshoot on the simple things is to make sure you don't overlook something and also that your mind isn't totally fixed on one particular thing which is the video card in this situation.

5 0
3 years ago
Other questions:
  • What do you call the number that is used as an index to pinpoint a specific element within an array?
    14·1 answer
  • A circuit has a resistance of 300 ohm and a current of 0.024 A. What is the voltage in the circuit?
    12·1 answer
  • What do you click to create a new presentation in Normal view
    14·1 answer
  • In reduced visibility conditions you need to work especially hard to gather visual information because
    7·1 answer
  • The machine should not be oiled until the
    11·1 answer
  • The keyboard usually has six rows of keys. Which of the following is not one of the key group categories?
    7·2 answers
  • Which is not one of the four criteria for proving the correctness of a logical pretest loop construct of the form: while B do S
    14·1 answer
  • What is the main difference between project tasks and client support tickets?
    11·1 answer
  • In C!!
    11·1 answer
  • What department is cyber security
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!