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
Different Betweens ServerPc And Desktop Pc ~
Andrew [12]

Answer:

<em>Science is a systematic enterprise that builds and organizes knowledge in the form of testable explanations and predictions about the universe. The earliest roots of science can be traced to Ancient Egypt and Mesopotamia in around 3000 to 1200 BCE.</em>

Explanation:

<em>"</em><em>serverPc </em><em>izz </em><em>serverPc</em>

<em>Desktop</em><em> </em><em>Pc</em><em> izz</em><em> </em><em>Desktop</em><em> </em><em>Pc"</em>

8 0
2 years ago
The inability of BAE Automated Systems to create an automated baggage handling system led to a significant delay in the opening
Sergeu [11.5K]

Answer:

True

Explanation:

Airport was truly opened outside the city of Denver, because of the faults in BAE automated system.

6 0
3 years ago
The operating system is not directly involved in one of these tasks.Immersive Reader
Alex73 [517]
Displaying a web page
3 0
3 years ago
Write a program that produces this output:
AveGali [126]

Answer:

void printC()  

{  

   int i, j;  

   for (i = 0; i < 4; i++) //i indicate row number. Here we have 5 rows

       {  

         printf("C"); //print C for every row  

         for (j = 0; j < 6; j++) //j indicate column number. Here we have 7 Rows

         {  

           if (i == 0 || i == 4) //For first and last row  

               printf("C"); //print 'CCCCCCC'

          else if (i = 1|| i= 3) //for Second forth row  

                printf("C        +      +"); //print 'C    +    +'

          else if (i = 2) For second row  

                printf("C       +++++"); //print 'C +++++'

           else

               continue; //to jump to next iteration

         }  

         printf("\n"); // print in next line

}  

}

4 0
3 years ago
According to the author. Consider diverse and various domains of programming languages and applications.
elixir [45]

Answer:

A system programming language has low - level features that allow a software interface to write in an external device. Some computer uses computer languages such as PL/S, PL/I. This is an example of System Programming or Language programming.

Explanation:

The system language is a language used for system programming such as writing system software, which requires different development approaches when compared with application software.

System programming is the activity of the computer system. The characteristic of system programming when application programming produces software is that application that provides services to create software platforms.                    

                     

5 0
3 years ago
Other questions:
  • Think of a game you are familiar with and identify at least three team responsibilities which were required to make the game, on
    5·1 answer
  • You can install several printers on your machine, but at least one must be the _______ printer.
    6·1 answer
  • What information should be included in the closing paragraph of a thank-you letter? a. Mention skills that were omitted during t
    6·2 answers
  • You have a large TCP/IP network and want to keep a host's real time clock synchronized. What protocol should you use?
    10·1 answer
  • Question #3
    12·1 answer
  • Hy plzz help me friends​
    5·2 answers
  • Which three techniques are used in this photo
    12·1 answer
  • (Comparable interface) Write Rectangle class that implements the Comparable interface. Override the equals method so that two Re
    12·1 answer
  • Write a SQL query to display films in inventory that have never been rented for all stores. Include inventory ID, film ID, film
    13·1 answer
  • When you create a new database using --------- , the database includes prebuilt tables and forms which you can populate with dat
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!