Question: Given a file for each decade from 1 9 0 0 - 1 9 9 0 ( a century of names ) and using information

Given a file for each decade from 1900-1990(a century of names) and using information from the user(the baby name that the user wishes to resarch and the gender list that they wish to search for the baby name entered). You will search each file and print the rank for each decade in the 1900'sYou will need to make sure that the name entered by the user is in the correct format, meaning that the first letter is capitalized, but the rest of the letters are not. See lower() and title() string functions.
To get the gender, you'll make use of a menu and let them enter a 1(for male) or a 2(for female). Be sure to validate (using a loop, not exception handling) the integer.
You will need to write a function named getRank() that is sent from the calling function the name of the file, the baby name, and the gender (in that order). It returns the rank found in the file as a string. If the name is not found, it returns the string "Not ranked"
In order for the unit tests to work, you must include the following at the end of your program:
if _="":
)
Sample Execution 1:
Enter the baby name you wish to research: marion
Which gender list do you wish to research?
Male
Female
Enter selection: 3
ERROR: must enter a 1 or a 2
Please re-enter: 1
For name: Marion
Decade Rank
======,===========
1900,130
1910,118
1920,113
1930,138
Given a file for each decade from 1 9 0 0 - 1 9 9

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!