Question

I am having trouble writing a python program that opens a file that contains baby names. One file for boys and one for girls. The user inputs a name and the program searches the list to see if the name is in either file. I have the loop set and the program runs with no exception error but no matter what name is entered, the program does not find it.

Expert Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times vary by subject and question complexity. Median response time is 34 minutes and may be longer for new subjects.

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: The category of operating system used for handheld devices.

A:  Handheld DevicesA handheld device is an electronic or a computing device that can be carried in our...

Q: The print is very small. I apologize in advance for this.  With this homework that has already been ...

A: High Level DesignFrom the limited information that has been provided here, here are the suggestions:...

Q: Please explain how you solve the follwing problem:

A: a) Set of nullable variables is {A, B, C} as A and C will be null for productions A -> λ and C-&g...

Q: In C++. Data canvas is a file with bunch of random words.        Data canvas: aahs aals abas abba ab...

A: Program Instructions:Use the open() function of fstream to open the file.Use do-while and while loop...

Q: In my C++ program I am trying to have a series of if statements check if a user input is negative, n...

A: To check the input is of the given type (double), use the following:if (cin >> numberOfShares)...

Q: CHALLENGE 3.16.2: Alphabetic replace. ACTIVITY Replace any alphabetic character with ' in 2-characte...

A: Program://include the required header files#include <iostream>#include <string>#include ...

Q: How important is wifi to expansion of computer poliferation

A: Importance of Wi-Fi expansion to computer proliferation:Increased scalability:Wi-Fi is used to avoid...

Q: In C++ Create a function that takes in an array and outputs the min, max and average of the array to...

A: A function is to be created in C++ that will take in an array and will results with minimum, maximum...

Q: A bit confused on where to begin this program. I'm confused by the information I'm being given I thi...

A: In this program user wants to perform following tasks:    1.Taking inputs as a (A, B, C).     2. Cal...