Question: in Python Submission instructions: 1. Use the questions here for practicing dictionaries. Problem: In-N-Out of the MTA System In this problem, we will have a

in Python in Python Submission instructions: 1. Use the questions here for practicing dictionaries.Problem: In-N-Out of the MTA System In this problem, we will havea brief introduction to how data structures in computer science work. If

Submission instructions: 1. Use the questions here for practicing dictionaries. Problem: In-N-Out of the MTA System In this problem, we will have a brief introduction to how data structures in computer science work. If you've ever used any transit app to get directions in the NYC subway system, you probably were given either direct subway routes or directions to transfer at specific stops to other subway lines. These apps use data listing all the subway stations on each subway line and data about which stations have transfers from which line to which other line(s). Don't worry about details of how these apps work. In this homework, you'll write a program that deals with one aspect of such apps -- looking into the subway system with a Python program that reads and analyzes data from a given data file similar to those supplied by the MTA. Your task is to design and write a program that will repeatedly ask the user for a train line until he/she enters 'done'. For each train line input the program should print out the stops of that train Follow this format (This is sample data and your actual data may not represent as such): Please enter a train line, or "done' to stop: 1 1 line: Van Cortlandt Park -242 St, 238 St, 231 St, Marble Hill - 225 St, 215 St, Please enter a train line, or 'done to stop: A A line: Inwood- 207 St, Dyckman St, 190 St, 181 St, 175 St, 168 St, 145 St, 125 St, 59 St - Columbus Circle, 42 St - Port Authority Bus Terminal, Please enter a train line, or 'done to stop: done You are supplied with a file in ".csv' format, where the first line in the file outlines the columns. One important thing to know about this data file is that the first character in each stop id field indicates the train line. For example, if the stop_id is 221S it means that this is a stop of the 2 train (since 2 is the first character in 221S) Submission instructions: 1. Use the questions here for practicing dictionaries. Problem: In-N-Out of the MTA System In this problem, we will have a brief introduction to how data structures in computer science work. If you've ever used any transit app to get directions in the NYC subway system, you probably were given either direct subway routes or directions to transfer at specific stops to other subway lines. These apps use data listing all the subway stations on each subway line and data about which stations have transfers from which line to which other line(s). Don't worry about details of how these apps work. In this homework, you'll write a program that deals with one aspect of such apps -- looking into the subway system with a Python program that reads and analyzes data from a given data file similar to those supplied by the MTA. Your task is to design and write a program that will repeatedly ask the user for a train line until he/she enters 'done'. For each train line input the program should print out the stops of that train Follow this format (This is sample data and your actual data may not represent as such): Please enter a train line, or "done' to stop: 1 1 line: Van Cortlandt Park -242 St, 238 St, 231 St, Marble Hill - 225 St, 215 St, Please enter a train line, or 'done to stop: A A line: Inwood- 207 St, Dyckman St, 190 St, 181 St, 175 St, 168 St, 145 St, 125 St, 59 St - Columbus Circle, 42 St - Port Authority Bus Terminal, Please enter a train line, or 'done to stop: done You are supplied with a file in ".csv' format, where the first line in the file outlines the columns. One important thing to know about this data file is that the first character in each stop id field indicates the train line. For example, if the stop_id is 221S it means that this is a stop of the 2 train (since 2 is the first character in 221S)

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!