Computers and Technology

If you have downloaded the source code from this book's companion web site, you will find the following files in the Chapter 07 folder: GirlNames. txt--This file contains a list of the 200 most popular names given to girls born in the United States from the year 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 the year 2000 through 2009.
Write a program that reads the contents of the two files into two separate lists, allows a user to input either a girl's name, a boy's name, or both, then tells the user whether the name(s) was/were popular between 2000 and 2009.
First, the program should prompt the user to choose a girl's name, a boy's name, or both by entering either 'girl', 'boy', or 'both.'
Once they have chosen, they should be able to input a name. If the name was a popular name, like Jacob or Sophia, the program should print "Jacob was a popular boy's name between 2000 and 2009." or "Sophia was a popular girl's name between 2000 and 2009."
If the name was not a popular name, like Voldemort, the program should print "Voldemort was not a popular boy's name between 2000 and 2009."
If the user chooses to input both a girl and boy's name, ask for the boy's name, then the girl's name, and print two statements in the form mentioned above on two separate lines, with the statement about the boy's name coming first. For example, if the user inputs Voldemort and then Sophia, print:
Voldemort was not a popular boy's name between 2000 and 2009. Sophia was a popular girl's name between 2000 and 2009.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:30, alexandramendez0616
Jasper and samantha are in a robotics competition. the guidelines state that the robots should be able to move a 10-gram weight at least 2 meters and turn in a circle. jasper and samantha have already built the robot. which step of the design process should they follow next to decide whether their robot meets the minimum criteria for the competition?
Answers: 1
image
Computers and Technology, 23.06.2019 03:30, mem81
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
image
Computers and Technology, 23.06.2019 06:00, jack487
How can a user delete a drawing object
Answers: 1
image
Computers and Technology, 23.06.2019 16:30, azainababbas
20 points archie wants to use a reflector as he photographs a newlywed couple. what would he consider in his choice? a. shadow and sunny b. homemade and professional c. lamps and boards d. incident and reflected e. neutral density and enhancement
Answers: 3
Do you know the correct answer?
If you have downloaded the source code from this book's companion web site, you will find the follow...

Questions in other subjects:

Konu
Mathematics, 10.12.2020 18:30
Konu
Mathematics, 10.12.2020 18:30