2
answers
0
watching
105
views
9 Jul 2018

Part (b) [2 MARKS] Here is the header, type contract, and description for method log_trip in class Airplane. Add an example that creates an Airplane object, logs a trip of 1000.0 miles, and shows that those miles have been logged. Also write the body of the method. def log_trip(self, num_miles): (Airplane, float) -> None Type Precondition: num_miles > 0.0 Record that the airplane travelled num_miles additional miles.

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
Tod Thiel
Tod ThielLv2
10 Jul 2018
Already have an account? Log in
Start filling in the gaps now
Log in