write a function get_direction(start, end) that returns the end station that is in the direction of travel between the start and end , or None if the start and end is not on the same line. use python
write a function get_direction(start, end) that returns the end station that is in the direction of travel between the start and end , or None if the start and end is not on the same line. use python
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
write a function
get_direction(start, end) that returns the end station that is in the direction of travel between the start and end , or None if the start and end is not on the same line.
use python

Transcribed Image Text:Boston Subway
The Boston Subway e has four different colored trains, some of which have multiple
routes. We have simplified the routes so that each train has a single route with the
following stations (in order from north to south) and that each colored line intersects
with another colored line at exactly one station.
• Red Line: Alewife, Davis, Porter, Harvard, Central, Kendall/MIT, Charles/MGH,
Downtown Crossing, South Station, Broadway, Andrew, JFK/UMass
• Orange Line: Oak Grove, Malden Center, Wellington, Assembly, Sullivan Square,
Community College, North Station, Haymarket, State, Downtown Crossing,
Chinatown, Tufts Medical Center, Back Bay, Mass Avenue, Ruggles, Roxbury
Crossing, Jackson Square, Stony Brook, Green Street, Forest Hills
• Blue Line: Wonderland, Revere Beach, Beachmont, Suffolk Downs, Orient Heights,
Wood Island, Airport, Maverick, Aquarium, State
• Green Line: Haymarket, Government Center, Park Street, Boylston, Arlington,
Copley, Haynes Convention Center, Kenmore, Blandford Street, Boston University
East, Boston University Central, Boston University West, Saint Paul Street,
Pleasant Street, Babcock Street, Packards Corner, Harvard Avenue, Griggs Street,
Allston Street, Warren Street, Washington Street, Sutherland Road, Chiswick Road,
Chestnut Hill Avenue, South Street, Boston College
Station names must match exactly (unforgiving about upper/lowercase and
abbreviations) with the exception of names that have a "/" in them. These stations can
be referred to be either one. For example, both "Kendall" and "MIT" refer to the same
station.
Note: The simplification of our train lines is such that each line intersects with other
lines in exactly one station. But not all lines intersect every other line.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education