Part 5: Identify the Active Club Members (10 points) Complete the function find_active members, which opens and processe

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Part 5: Identify the Active Club Members (10 points) Complete the function find_active members, which opens and processe

Post by answerhappygod »

Part 5 Identify The Active Club Members 10 Points Complete The Function Find Active Members Which Opens And Processe 1
Part 5 Identify The Active Club Members 10 Points Complete The Function Find Active Members Which Opens And Processe 1 (51.2 KiB) Viewed 16 times
Part 5 Identify The Active Club Members 10 Points Complete The Function Find Active Members Which Opens And Processe 2
Part 5 Identify The Active Club Members 10 Points Complete The Function Find Active Members Which Opens And Processe 2 (24.22 KiB) Viewed 16 times
Part 5 Identify The Active Club Members 10 Points Complete The Function Find Active Members Which Opens And Processe 3
Part 5 Identify The Active Club Members 10 Points Complete The Function Find Active Members Which Opens And Processe 3 (21.63 KiB) Viewed 16 times
Part 5: Identify the Active Club Members (10 points) Complete the function find_active members, which opens and processes a CSV file containing information about club member attendance. A college club on campus holds events a semester, and "active members are those who attend 3 or more events a semester. The club keeps track of attendance in an input file like so: Name, GEMI, GEM2, GBM3, GBM4, CEMS, GEMS Jane Doe, 1, 0.0.1.1.0 John Smith, 0, 0, 1.0, 0, 0 Anna Lee, 0, 0, 0, 0. 1. 1 Steve Fox, 1.1.1.1.1.1 The function then performs two tasks: 1. It creates a dictionary that maps a student's name (the key of the dictionary) to the number of events the student has attended (the value). 2. It returns a list of the names of all the students who are active members in the club. Hints: • A function sun_list has been provided to you that takes a list of strings representing integers, converts the strings to actual integers, and returns the sum of those integers. Feel free to use or ignore the function - your choice. • The next function will let you proceed through a collection of values one at a time. You might find it useful for skipping over the first row of the CSV file. Assuming that reader stores the return value from the cax. reader function: reader cav. reader (...) then the following code will read the headings from the CSV file and save them in fieldnames: fieldnames next (reader) 4 Next, the following loop can be used to process the remainder of the CSV file, starting at the first row of actual data (immediately after the row of headings): for row in reader:
Example #1: Contents of amberal.com: Nam, CEMI, GEMMS, GEAN, ES, GES Jan De 1.0, 1.10. John th, 0, 0, 1.0.0.0 Ana Lee. 0.0.GALI Steve Fox, 1.1.1.1.1.1. Return Value: Jane Doe Steve Fox 1 Example #2: Contents of acabera2.cax: Nane, COMI, GEM, CEM, GMA, GEMS John alth 1.1.1.0.0 Jane Doe, 1, 1,0,1,1 arts Rock, 0,1,0,0,1 Steve Rogers, 0, 1.0, 1.1 Thor Odtnson, 1, 1, 1, 1, 0. Return Value: John aith, Jane Doe, Stere Rogers, Thur odinson'] 27
a () Contents of arabera3.cax: Nae, GEMI, CEM CEMS, CEMA, GEMS, GEMS, GEMT, GEM Joh Sath 0,0,0,0,0,1,0,1 Jane Doe. 1.0.1.0.1.0.10 Chris Rock, 0, 1.0.0.1.1.0, 1. Steve Kogers, 0, 1.0, 1. 1. 0, 0,0 Thor odinson, 1.1.1.1.0.0.0.0 Donald Duck, 0, 0.0.0.0.1.1.1 Clark Kent, 1.0, 0.09 10.1 Return Value: I'Jane Doe Chris Rock'. Steve Rogers. Thor Odinson". "Donald Duck. "Clark Kent"] Example #4: Contents of bers.cax: Name, GEMI, GEM GEM, CEM, CEMS, GEM, GEMT, GEME, GEM John Seith 1.0, 0, 0, 0, 1.0, 1.0 Jane Doe, 1, 0, 1,01a1a0 Chris Rock, 0, 1.0.0.0, 1.0, 1.1 Steve Rogers, 0, 1, 0, 0, 0, 0, 0, 0,0 Ther Odinson 1.1.1.0.0.0.0.0.1 Donald Duck, 0, 0, 0, 0, 0, 1.0, 1.1 Clark Kent, 1.0, 0.0.0, 1.0, 1.01 Lots Lane, 1, 0, 0, 0, 1, 0, 0, 1,0 Return Value: John Dalth, Jane Doe. Chris Rock. Thor odinson, Donald Duck, 'Clark Kent'. Lots Lane')
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply