1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Usimov [2.4K]
3 years ago
7

[Exceptions, Function calling another function] Write a function ticker() that first runs (calls) read_ticker() 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.
this is the function that needs to be called:
def read_ticker():
d = {'1347 Capital Corp.': ('TFSCW', '2014'), '1347 Property Insurance Holdings, Inc.': ('PIH', '2014'), '1-800 FLOWERS.COM, Inc.': ('FLWS', '1999')}
return d
Computers and Technology
1 answer:
Serhud [2]3 years ago
6 0

def read_ticker():

   d = {'1347 Capital Corp.': ('TFSCW', '2014'), '1347 Property Insurance Holdings, Inc.': ('PIH', '2014'),

        '1-800 FLOWERS.COM, Inc.': ('FLWS', '1999')}

   return d

def ticker():

   di = read_ticker()

   while True:

       try:

           name = input("Enter the name of a company: ")

           if name == "":

               return

           print(di[name])

       except KeyError:

           print("Name not found! Please enter a valid name!")

ticker()

I hope this helps!

You might be interested in
Please
levacccp [35]

Answer:

inspect

Explanation:

7 0
3 years ago
If you want to refine your google search results by date, which option should you use?
VashaNatasha [74]
Advanced Search. It's able to filter out things.
8 0
3 years ago
Billy needs to type a bibliography/reference page for the report that he just typed. Which paragraph format should he use?
Olin [163]
He should use a MLA format

3 0
3 years ago
A(n) ____ address is an assigned series of numbers, separated by periods, that designate an address on the Internet.
schepotkina [342]

Answer: An <em>IP</em> address is commonly referred to as an accredited series of numbers, disjointed by periods, this eventually provides an address on web. In laymen terms, an IP address is commonly known as a numerical label accredited to a device that is connected to a network which uses the IP for communication.

6 0
3 years ago
What are the disadvantages of using social media to communicate with colleagues?
yanalaym [24]

Answer:

The overall finding of the study is that this type of distraction can potentially decrease work performance and productivity, Increased Risk of Malware, Damaged Employee Productivity, Reduced Employee Relations, and Confidentiality and Company Image. Security. Using social media platforms on company networks opens the door to hacks, viruses and privacy breaches, Harassment, Negative exposure, Legal violations, Potential loss of productivity, and Wage and hour issues.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which wildcat character will return a single character when using the find dialog box
    14·1 answer
  • Who usually signs a collection letter?
    15·2 answers
  • Wich is the correct process for selecting an entire row in a spreadsheet?
    12·1 answer
  • 1.which of the following CANNOT be copyrighted?
    7·1 answer
  • Which of the following statements applies to a proprietary software license? a. Purchased from a vendor and gives you the right
    5·1 answer
  • In this lab, you will write a function called numberGuessingGame(). When the function is called, it will do the following: gener
    13·1 answer
  • Which deployment tool will you use to deploy metadata from one organization to another organization?
    6·1 answer
  • The company’s computer network is down. Who should you contact to correct this problem? Information Technology Associate Master
    12·1 answer
  • Given the following class: Create a class MyGenerator that can be used in the below main method.
    8·1 answer
  • An articulated robot has a T-type wrist axis that can be rotated a total of 2 rotations (each rotation is a full 3600 ). It is d
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!