Vluchten plannen

Log in om je oplossingen te testen.
class Flight: def __init__(self, passengers, distance): self.passengers = passengers self.distance = distance def __repr__(self): return f'Flight({self.passengers}, {self.distance})' def __eq__(self, other): return self.passengers == other.passengers and self.distance == other.distance def __hash__(self): return hash((self.passengers, self.distance)) class Airplane: def __init__(self, capacity, radius): self.capacity = capacity self.radius = radius def __repr__(self): return f'Airplane({self.capacity}, {self.radius})' def __eq__(self, other): return self.capacity == other.capacity and self.radius == other.radius def __hash__(self): return hash((self.capacity, self.radius))