Question: please verify your code by running it and displaying the results Write a python function that playerHasLastInitial(filename, char) that takes in a file name and

please verify your code by running it and displaying the results

Write a python function that playerHasLastInitial(filename, char) that takes in a file name and a single letter as input

and RETURNS True if a player on the roster has a last name beginning with that character, otherwise False. We want to avoid loading the whole file into memory, so use a while loop and the file readline() method

run:

playerHasLastInitial('cubsRoster.csv', 'A')

file: cubsRoster.csv

Name Age CountryCode
Jim Adduci 34 CA
Albert Almora 25 US
Adbert Alzolay 24 VE
Javier Baez 26 PR
Tony Barnette 35 US
David Bote 26 US
Brad Brach 33 US
Kris Bryant 27 US
Victor Caratini 25 PR
Nicholas Castellanos 27 US
Xavier Cedeno 32 PR
Tyler Chatwood 29 US
Steve Cishek 33 US
Tim Collins 29 US

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!