Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need a program func() that takes a string which represents the name of a file

ID: 3644274 • Letter: I

Question

I need a program func() that takes a string which represents the name of a file as a parameter. In this file, it contains company names and stock symbols. Also, the company name appears on one line and the stock symbol for that company is on the next line. They appear in all caps. The function() program reads the file and then it will store the name of the company and the stock symbols in a DICTIONARY. Then it gives an interface to the user so that the user can get the stock symbol for the given company. It should be ok in lowercase, uppercase, mixed and still be able to get the symbol and when a blank company name is entered, the program should end.

**The code isn't extremely long or complex, especially cause this is early in Python**

- This is how it looks in the word file.
ACTIVISION INC
ATVI
ADOBE SYS INC
ADBE
ALTERA CORP
ALTR
AMAZON
AMZN
With many more also.
Example of how it runs

>>> func('nasdaq.txt')
Enter a company name: Yahoo
Ticker symbol: YHOO
Enter a company name: Google INC
Ticker symbol: GOOG
Enter a company name:
Thank you for using the ticker lookup system!

Explanation / Answer

#include #include using namespace std; int main () { char *line = "short line for testing"; // with no arguments string s1; s1 = "Anatoliy"; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote