Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3 ) Vehicle Routing An intercampus shutule can take one of several routes. For each run, a dispatcher checks what the current traffic conditioss are

3) Vehicle Routing An intercampus shutule can take one of several routes. For each run, a dispatcher checks what the current traffic conditioss are to find out the average speed on each route and determine wit route the shuttle driver should take. a) Write a program that, in a while loop: prompts for two inputs: distance in miles and speed in miles per hour - calculates the time the route should take (in minutes) and displays this result - keeps track of which alternative route is the fastest and displays this after all routes are entered Here is an example session: Enter route 1 distance (miles): 30 Enter route 1 speed (miles/hour) : 60 More routes ( y/n)7:y Enter route 2 distance (eiles): 25 Enter route 2 speed (mileshour) : 55 More routes(y/n)? Route 2 is fastest; 27 minutes b) Asume current traffic conditions are as follows. Run your program uxing the data below to determise the fautect rouk. \begin{tabular}{|l|c|c|}\hline Route Type & \begin{tabular}{c} Distance \(miles)\end{tabular} & \begin{tabular}{c} Current sped \(mileshour)\end{tabular}\\hline local & 30 & 30\\hline parkway & 35 & 40\\hline highway & 48 & 55\\hline \end{tabular} c) Enhance your program to detect invalid inputs of 0 or negative values for distance or speed.1- creates a Python code .2- Create a flowchart the visually depicts how the program will work.3- write program Pseudocode ( detail algorithm) and add it as a comment block to the submitted program.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions