This section describes the required functions that you must add to your module. You are encouraged to create additional helper functions where necessary. You must test these functions using different text files inside the main() function. The final version of your module must only contain functions and a single call to the main() function (i.e., there should not be any additional function calls or print statements outside the main() function).

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter6: Sub And Function Procedures
Section: Chapter Questions
Problem 1MQ3
icon
Related questions
Question

This section describes the required functions that you must add to your module. You are
encouraged to create additional helper functions where necessary. You must test these functions
using different text files inside the main() function. The final version of your module must only
contain functions and a single call to the main() function (i.e., there should not be any additional
function calls or print statements outside the main() function).

This section describes the required functions that you must add to your module. You are
encouraged to create additional helper functions where necessary. You must test these functions
using different text files inside the main() function. The final version of your module must only
contain functions and a single call to the main() function (i.e., there should not be any additional
function calls or print statements outside the main() function).
(c) return_list() that takes the name of a csv file as the input parameter and returns a 2D list.
I will call this 2D list database in the rest of this specification, but you may rename it. Each
element of database must contain data from each row of the csv file as follows.
[Case_Reported_Date1,
[
[Case_Reported_Date2, Age_Group2, Client_Gender2, Reporting_PHU_ID2],
Client_Gender1,
Reporting_PHU_ID1],
.. ]
Age_Group1,
Note: It should not include the header row from the file. You will need to remove the 's' from
the values of the Age_Group field, you can still sto
Reporting_PHU_IDs as integers.
them
strings. You must
re the
See sample output below.
>>> database = return_list(“data10.csv")
>>> display_2Dlist(database)
['2021-05-19',
['2021-05-22', '40',
['2021-05-19',
['2021-05-20',
['2021-05-19', '70'
['2021-05-19', '<20',
['2021-05-19'.
['2021-05-20',
['2021-05-19'
['2021-05-19', '20', 'MALE', 2270]
['2021-05-21', '<20', 'FEMALE', 2253]
['2021-05-19',
'40', 'MALE', 2241]
'MALE', 2265]
'FEMALE', 2244]
'MALE', 4913]
'FEMALE', 2251]
'FEMALE', 2244]
'GENDER DIVERSE', 3895]
'MALE', 2237]
'MALE', 2268]
'60
'60',
'<20'
'<20'
'<20'
'30', 'UNSPECIFIED', 3895]
Transcribed Image Text:This section describes the required functions that you must add to your module. You are encouraged to create additional helper functions where necessary. You must test these functions using different text files inside the main() function. The final version of your module must only contain functions and a single call to the main() function (i.e., there should not be any additional function calls or print statements outside the main() function). (c) return_list() that takes the name of a csv file as the input parameter and returns a 2D list. I will call this 2D list database in the rest of this specification, but you may rename it. Each element of database must contain data from each row of the csv file as follows. [Case_Reported_Date1, [ [Case_Reported_Date2, Age_Group2, Client_Gender2, Reporting_PHU_ID2], Client_Gender1, Reporting_PHU_ID1], .. ] Age_Group1, Note: It should not include the header row from the file. You will need to remove the 's' from the values of the Age_Group field, you can still sto Reporting_PHU_IDs as integers. them strings. You must re the See sample output below. >>> database = return_list(“data10.csv") >>> display_2Dlist(database) ['2021-05-19', ['2021-05-22', '40', ['2021-05-19', ['2021-05-20', ['2021-05-19', '70' ['2021-05-19', '<20', ['2021-05-19'. ['2021-05-20', ['2021-05-19' ['2021-05-19', '20', 'MALE', 2270] ['2021-05-21', '<20', 'FEMALE', 2253] ['2021-05-19', '40', 'MALE', 2241] 'MALE', 2265] 'FEMALE', 2244] 'MALE', 4913] 'FEMALE', 2251] 'FEMALE', 2244] 'GENDER DIVERSE', 3895] 'MALE', 2237] 'MALE', 2268] '60 '60', '<20' '<20' '<20' '30', 'UNSPECIFIED', 3895]
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Reference Types in Function
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
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,