Git Product home page Git Product logo

python-mbta-challenge's Introduction

General Assembly Logo

Python MBTA Challenge

Instructions

  1. Fork and clone this repository.
  2. Change into the new directory.
  3. Create and checkout a new branch to work on.
  4. Fulfill the listed requirements.
  5. Be sure to do your work in challenge.js

A pull request is not required, but it is necessary if you want a code review.

You may wish to refer to FAQs related to forking, cloning.

Requirements

Create a program that models a simple subway system.

  • The program takes the line and stop that a user is getting on at and the line and stop that user is getting off at and prints the total number of stopsfor the trip.

There are 3 subway lines:

The Red line has the following stops:

  red_line = south station, park st, kendall, central, harvard, porter, davis, alewife

The Green line has the following stops:

  green_line = haymarket, government center, park st, bolyston, arlington, copley

The Orange line has the following stops:

  orange_line = north station, haymarket, park st, state, downtown crossing, chinatown, back bay, forest hills

All 3 subway lines intersect at park st, but there are no other intersection points. Some of this MBTA is fictionalized. Haymarket does not connect the orange/green lines.

Hints

  • Assume good user input. Don't do lots of checking to ensure good input.

  • You should be able to try to calculate the distance in your code without user input, but in the end we'll want user input.

  • You need to prompt the user for four pieces of input data.

  • Consider diagraming the lines by sketching out the subway lines and their stops and intersection.

  • The key to the lab is to find the intersection of the lines at park st.

Source code distributed under the MIT license. Text and other assets copyright General Assembly, Inc., all rights reserved.

python-mbta-challenge's People

Contributors

realweeks avatar

Watchers

James Cloos avatar Jessica Cornman-Homonoff avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.