2
answers
0
watching
187
views
26 Aug 2018

Part (f) [3 MARKS] Complete method change-planes in class Flight: def change-planes(self, other_airplane): (Flight, Airplane) -> bool If other airplane has enough seats to hold the passengers on this flight, use other airplane for this flight. Whether or not we change to other_airplane, return the number of available seats on this flight (seats not currently occupied by passengers). >>> a1 = Airplane ('Boeing 747', '19643', 366, 45267.7) >>> f = Flight(a) >>> f.add('Myrto') True >>> f.add('Jen' True >>> a2 = Airplane ('Bombardier Dash 8', '11234', 39, 6444.6) >>> f.change-planes (a2) >>> a3 = Airplane('Cessna 150E', '9378', 1, 824.8) >>> f.change-planes (a3) 37

For unlimited access to Homework Help, a Homework+ subscription is required.

Unlock all answers

Get 1 free homework help answer.
Already have an account? Log in
Keith Leannon
Keith LeannonLv2
28 Aug 2018
Already have an account? Log in
Start filling in the gaps now
Log in