Question: I need to complete the following assignment in pycharm: write a program that reads the contents of the two files into separate lists. The user

I need to complete the following assignment in pycharm:

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.

I currently have this: which is where I took the files of the girls and boys name and appended them into a list. I know this is right. What I am struggling on is creating a while loop to ask the user to input a name.

I need to complete the following assignment in pycharm: write a program

the run of the solution should look like this. Thanks! that reads the contents of the two files into separate lists. The

girlsName= [] girlsFile-open ("GirlNames.txt','r') for line in girlsFile: line-line.rstrip("In') girlsName.append (line) boysName[ boys File = open ( ' BoyNames . txt ' , for line in boysFile: ' r ' ) line = line . rstrip ( ' ' ) boysName.append (line)

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 Databases Questions!