Question: Use python 3.7.3 Write a function ticker() that first runs reads a txt file, and then stores the returned dictionary. It then runs an interactive

Use python 3.7.3

Write a function ticker() that first runs reads a txt file, and then stores the returned dictionary. It then runs an interactive loop with the user in which the user is prompted for a company name. If the company name (key) is in the dictionary, then its ticker form and the IPO year is printed. Otherwise a warning is printed that the company name is not in the list. If the user just hits return without entering a name, the loop stops.

>>> ticker()

Company name: Amazon.com

No ticker symbol on record for Amazon.com

Company name: Americao

No ticker symbol on record for Americao

Company name: Morningstar, Inc.

Morningstar, Inc. has ticker MORN. IPO: 2005

Company name:

>>>

nasdaq.txt : TFSC 1347 Capital Corp. 2014 TFSCR 1347 Capital Corp. 2014 TFSCU 1347 Capital Corp. 2014 TFSCW 1347 Capital Corp. 2014 PIH "1347 Property Insurance Holdings, Inc." 2014 FLWS "1-800 FLOWERS.COM, Inc." 1999 FCTY "1st Century Bancshares, Inc" n/a FCCY 1st Constitution Bancorp (NJ) n/a SRCE 1st Source Corporation n/a VNET "21Vianet Group, Inc." 2011 TWOU "2U, Inc." 2014 DGLD 3X Inverse Gold ETN Velocityshares n/a DSLV 3X Inverse Silver ETN Velocityshares n/a UGLD 3X Long Gold ETN Velocityshares n/a USLV 3X Long Silver ETN Velocityshares n/a JOBS "51job, Inc." 2004 SIXD "6D Global Technologies, Inc." n/a CAFD 8point3 Energy Partners LP 2015 EGHT 8x8 Inc n/a AVHI "A V Homes, Inc." n/a SHLM "A. Schulman, Inc." 1972 AAON "AAON, Inc." n/a ABAX "ABAXIS, Inc." 1992 ABY Abengoa Yield plc 2014 ABGB "Abengoa, S.A." 2013 ABEO Abeona Therapeutics Inc. n/a ABEOW Abeona Therapeutics Inc. n/a ABMD "ABIOMED, Inc." n/a AXAS Abraxas Petroleum Corporation n/a ACTG Acacia Research Corporation n/a ACHC "Acadia Healthcare Company, Inc." n/a ACAD ACADIA Pharmaceuticals Inc. 1985

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!