Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi, Python question here. I am trying to add to my function sum of the both flights. I created minimum time and used index to
Hi, Python question here.
I am trying to add to my function sum of the both flights.
I created minimum time and used index to remove last part of the string.
However, I would also like to sum up those 13h 35m and 14h 0m(strings) and add a sentence to my print function: "And total price equals:" + total_price. (27h 35m)
My data:
Function so far:
Departure Time Journey Duration Price Arrival Departure \begin{tabular}{lrrrr} \hline Seoul (ICN) - Warsaw (WAW) & 9:30am10:10pm & 20h 40m (1 stop) & 848 \\ & & & & \\ Seoul (ICN) - Warsaw (WAW) & 9:30am12:10pm & 34h40m (1 stop) & 850 \\ & & & & \\ Seoul (ICN) - Warsaw (WAW) & 8:50am2:25pm & 13h35m (Nonstop) & 910 \\ & & & & \\ Seoul (ICN) - Warsaw (WAW) & 10:45am10:00pm & 19h15m (1 stop) & 987 \\ & & & 34h20m (1 stop) & 989 \end{tabular} Departure Time Journey Duration Price Arrival Departure \begin{tabular}{llll} \hline Warsaw (WAW) - Seoul (ICN) & 6:20pm10:55am & 32h 35m (1 stop) & 478 \\ Warsaw (WAW) - Seoul (ICN) & 1:00pm12:15pm & 15h15m (1 stop) & 485 \\ Warsaw (WAW) - Seoul (ICN) & 8:55am12:15pm & 19h20m (1 stop) & 485 \\ Warsaw (WAW) - Seoul (ICN) & 1:25pm11:25am & 14h0m (1 stop) & 494 \\ Warsaw (WAW) - Seoul (ICN) & 6:55am11:25am & 20h 30m (1 stop) & 494 \end{tabular}Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started