C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section: Chapter Questions
Problem 8PP: (Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays...
icon
Related questions
Question

Write the following function in PYTHON

 

a) display_PHU_summary() takes three input parameters, a 2D-list (similar to database), a dictionary (similar to dict), and an integer for the PHU_ID. Your function must print the following information, the id, name, city, website, and the total number of cases reported at this PHU. If the given PHU_ID is invalid, it should print a message and exit the function.

>>> display_PHU_summary(database, dict, 2241)
PHU id: 2241
PHU name: Kingston Frontenac and Lennox & Addington Public Health
PHU city: Kingston, K7M 1V5
PHU website: www.kflaph.ca
Total cases: 1

>>> display_PHU_summary(database, dict, 3895)
PHU id: 3895
PHU name: Toronto Public Health
PHU city: Toronto, M5B 1W2
PHU website: www.toronto.ca/community-people/health-wellness-care/
Total cases: 2

>>> display_PHU_summary(database, dict, 3800)
The PHU Id is invalid 

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Binary numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr