3.2 [0.5 points] Perform the in-order traversal and print the list of the models on the screen.
Q.3 (PE_FA25_Q3.py) [1.5 points] Write a script to do the following task.
In addition to travel time, there is a travel fee (the gray part of the table) for each route as below
Route
ID
Travel time
Travel Fee
City 1
City 2
(h)
(USD)
1
C1 (New York)
C2 (Chicago)
2.5
180
2
C1 (New York)
C4 (Miami)
3
250
3
C2 (Chicago)
C3 (Los Angeles)
4
320
45
C2 (Chicago)
C5 (Toronto)
1.5
110
C3 (Los Angeles)
C4 (Miami)
4.5
350
6
C5 (Toronto)
C1 (New York)
1.5
150
7
C5 (Toronto)
C6 (London)
7
510
8
C6 (London)
C7 (Paris)
1.5
90
9
C7 (Paris)
C1 (New York)
7.5
620
You are tasked to write a program to find the most suitable route between two cities. The
decision to find the most suitable route is based on the joint minimum of travel time and travel
fee. However, travel time and travel fee contribute 70% and 30% to the decision, respectively.
You might use the partial or full implementation of the question Q1 (if needed) in this answer.
For 3 questions:
-The text of the tables in Question 1 and 3 is contained in the file "data.txt".
- Any built-in data structures are NOT permitted.
Important:
- Write and submit in two files (PE_FA25_Q1.py, PE_FA25_Q2.py, PE_FA25_Q3.py); students
will he deducted I noint if this romuiromont is not followed
+ 100%
Zoom
Close