Python Help! Main instructions in screenshot. I will paste the Names.txt file that I am to read from to pull baby names. If possible, create a boys' names list and a girls' names list. Thanks!!!
Names.txt:
Milo, Posie
Jasper, Isla
Atticus, Olivia
Theodore, Aurora
Asher, Maeve
Silas, Cora
Jack, Amara
Finn, Ada
Henry, Amelia
Felix, Charlotte
Aarav, Genevieve
Wyatt, Ophelia
Aryan, Ava
Oliver, Rose
Oscar, Eleanor
Leo, Lucy
Bodhi, Astrid
Arthur, Freya
Julian, Elodie
Louis, Luna
Levi, Adelaide
Ethan, Eloise
Soren, Anna
Harry, Adah
Eli, Iris
Theo, Violet
James, Thea
Charles, Adeline
Jude, Evelyn
Cassius, Alice
Ezra, Jane
Axel, Aurelia
Otis, Elizabeth
Liam, Nora
Emmett, Ivy
Charlie, Elsie
Aaron, Maia
Sebastian, Imogen
Declan, Hazel
Elio, Esme
William, Arabella
Thomas, Penelope
Caleb, Maisie
Lucas, Eliza
Benjamin, Josephine
Kai, Clara
Alexander, Lyra
Elijah, Willa
Owen, Chloe
August, Phoebe
Instructions from your teacher:
Baby Names
Names.txt contains boy and girls names separated by a comma. The first name pair is ranked #1 in popularity, the second is ranked #2 in popularity, etc. Open Names.txt and read a line from the file (20 points). Split the name pair, separated by a comma (20 points). Strip off any leading or trailing blanks in the names (20 points). Append the names to a list. You can use a boys' and girls' list or a 2-dimensional list (20 points). Prompt the user for a name. Strip off leading and trailing blanks, uppercase the first letter, and lowercase the rest of the name (20 points). If the user enters a "Q", then quit the program (20 points). Search both the boys' and girls' names list for a match (20 points). If a boy's name is found, print "Boy's Name - Rank" and the ranking (20 points). If a girl's name is found, print "Girl's Name - Rank" and the ranking (20 points). If the name is not found, print "Name Not Found" (20 points).
Sample Output:
Enter a Name: Cora
Girl's Name - Rank: 6
Enter a Name: cora
Girl's Name - Rank: 6
Enter a Name: cora
Girl's Name - Rank: 6
Enter a Name: Theodore
Boy's Name - Rank: 4
Enter a Name: John
Name Not Found
Enter a Name: Q