For this challenge, we will write a Python script to extract relevant information from a bus timetable to help end-users plan their journey.
Check the following timetable to answer the questions listed below:
- At what time will I reach Buckingham Palace if I take the 11:45 bus from St Paul’s Cathedral?
- At what time will I reach Oxford Circus if I take the 14:44 bus from Tower Bridge?
- I am planning to finish the visit of Tate Modern around 10:00? What would then be the earliest time for me to be at Covent Garden?
We have started some code to load the content of the above timebale into a 2-dimensional array (list of lists in Python) called timetable.
Your task is to complete the code to:
- Asks the user for the bus station they will take the bus from,
- Asks the user at what time they will be at the bus station,
- Asks the user where do they want to go,
- Outputs the earliest time the user can reach their destination.
Solution...The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area