Question
This program will use two files: GirlNames.txt and BoyNames.txt. They each contain the 200 most popular names for the years 2000-2009. You must download these
This program will use two files: GirlNames.txt and BoyNames.txt. They each contain the 200 most popular names for the years 2000-2009. You must download these files to your computer and place them in the directory that your Python program will run from. There is a video that will explain how to download these files.
Write a program that reads the contents of the two files into separate lists. The user will then be able to enter a name and the application will display messages indicating whether the name is among the most popular in each list and where the name ranked in each list.
Python 3.6.4 Shell File Edit Shell Debug Options Window Help Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] on win32 Type "copyright", "credits" or "license ()" for more information. RESTART: P:/Cmpsc131/Programming Assignment Solutions/PA9PopularName.py Enter a name to see if it is a popular girls or boys name. Enter a name to check, or "stop" to stop: Alyssa Alyssa is a popular girls name and is ranked: 14 Alyssa is not a popular boys name Enter a name to check, or "stop" to stop: Fred Fred is not a popular girls name Fred is not a popular boys name Enter a name to check, or "stop" to stop: Riley Riley is a popular girls name and is ranked: 67 Riley is a popular boys name and is ranked: 107 Enter a name to check, or "stop" to stop: stop Python 3.6.4 Shell File Edit Shell Debug Options Window Help Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] on win32 Type "copyright", "credits" or "license ()" for more information. RESTART: P:/Cmpsc131/Programming Assignment Solutions/PA9PopularName.py Enter a name to see if it is a popular girls or boys name. Enter a name to check, or "stop" to stop: Alyssa Alyssa is a popular girls name and is ranked: 14 Alyssa is not a popular boys name Enter a name to check, or "stop" to stop: Fred Fred is not a popular girls name Fred is not a popular boys name Enter a name to check, or "stop" to stop: Riley Riley is a popular girls name and is ranked: 67 Riley is a popular boys name and is ranked: 107 Enter a name to check, or "stop" to stop: stopStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started