Vluchten plannen
Sign in to test your solution.
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))
You can submit as many times as you like. Only your latest submission will be taken into account.
Sign in to test your solution.
Python sandbox
This window allows you to run Python code without installing a thing. The code you write here is not automatically submitted to Dodona.