Question: The data used for this assignment is a subset of the data found in: https://www.ontario.ca/data/bridge-conditions def read_data(csv_file: TextIO) -> List[List[str]]: Read and return the contents

The data used for this assignment is a subset of the data found in: https://www.ontario.ca/data/bridge-conditions

def read_data(csv_file: TextIO) -> List[List[str]]: """Read and return the contents of the open CSV file csv_file as a list of lists, where each inner list contains the values from one line of csv_file.

Docstring examples not given since results depend on csv_file. """

lines = csv.reader(csv_file) data = list(lines)[2:] return data

Please make this get_total_length_on_highway function in python, thank you

def get_total_length_on_highway(bridge_data: List[list], highway: str) -> float: """Return the total length of bridges in bridge_data on highway. Use zero for the length of bridges that do not have a length provided. If there are no bridges on highway, return 0.0.

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!