Answered step by step
Verified Expert Solution
Link Copied!

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:

image text in transcribed

Function so far:

image text in transcribed

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

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_2

Step: 3

blur-text-image_3

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

Database Systems For Advanced Applications 9th International Conference Dasfaa 2004 Jeju Island Korea March 2004 Proceedings Lncs 2973

Authors: YoonJoon Lee ,Jianzhong Li ,Kyu-Young Whang

2004th Edition

3540210474, 978-3540210474

More Books

Students also viewed these Databases questions

Question

Find dy/dx if x = te, y = 2t2 +1

Answered: 1 week ago