Question: Please use try and except method to solve the problem es New Roman 13 1 Normal 1 No Spac. Heading 1 Editing Dic Font Styles

Please use try and except method to solve the problem  Please use try and except method to solve the problem es
New Roman 13 1 Normal 1 No Spac. Heading 1 Editing Dic

es New Roman 13 1 Normal 1 No Spac. Heading 1 Editing Dic Font Styles 3. Write a function tickerO that takes a string representing the name of a file as a parameter. The file contains company names and stock (ticker) symbols. In the file, the company name appears on one line and the stock symbol for that company appears on the following line. Both the company name and the stock symbol appear in all caps. For example, see the file nasdaq.txt in the zip file containing the assignment template. The ticker() function reads the file and stores the company names and stock symbols in a dictionary. It then provides an interface to the user so that he/she can obtain the stock symbol for a given company. The user should be able to provide the name of the company in lowercase, uppercase, or mixed case and get the stock symbol associated with the company found in the file the function processed. When the user enters a blank company name, the program should stop. If the file provided as a parameter cannot be opened, the function should display an appropriate message and stop. Test your program on the nasdaq.txt file provided with the assignment template. Some sample interactions are provided below: >ticker(nasdaq.txt') Enter Company name: facebook FACEBOOK is not in the ticker system Enter Company name: eBay Ticker symbol: EBAY Enter Company name: ank you for using the ticker system. >>>ticker(noFile.txt') noFile.txt could not be opened. Exiting. . words 3. Write a function ticker) that takes a string representing the name of a file as a parameter. The file contains company names and stock (ticker) symbols. In the file, the company name appears on one line and the stock symbol for that company appears on the following line. Both the company name and the stock symbol appear in all caps. For example, see the file nasdaq.txt in the zip file containing the assignment template. The ticker) function reads the file and stores the company names and stock symbols in a dictionary. It then provides an interface to the user so that he/she can obtain the stock symbol for a given company. The user should be able to provide the name of the company in lowercase, uppercase, or mixed case and get the stock symbol associated with the company found in the file the function processed. When the user enters a blank company name, the program should stop. If the file provided as a parameter cannot be opened, the function should display an appropriate message and stop. Test your program on the nasdaq.txt file provided with the assignment template. Some sample interactions are provided below: >>ticker(nasdaq.txt') Enter Company name: facebook FACEBOOK is not in the ticker'system. Enter Company name: eBay Ticker symbol: EBAY Enter Company name: 7 ank you for using the ticker system. >>>ticker(noFile.txt') noFile.txt could not be opened. Exiting

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!