Question: def get_customer_by_id(file_variable, id_number): ------------------------------------------------------- Find the record for a given ID in a comma-delimited sequential file. Use: result = get_customer_by_id(file_variable, id_number) ------------------------------------------------------- Preconditions: file_variable

def get_customer_by_id(file_variable, id_number): """ ------------------------------------------------------- Find the record for a given ID in a comma-delimited sequential file. Use: result = get_customer_by_id(file_variable, id_number) ------------------------------------------------------- Preconditions: file_variable - comma-delimited file to search (file - already open for input) id_number - the id_number to match (str) Postconditions: returns result - a list of the fields of the record with id_number if it exists, None otherwise (list) ------------------------------------------------------- """ 

Sample results (text in italics is user input):

Find customer by id_number Enter an ID: 23456 ['23456', 'Alice', 'Smith', '1200.50', '1998-02-20'] Find customer by id_number Enter an ID: 99999 None 

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!