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))
Je kunt zo vaak indienen als je wenst. Er wordt enkel rekening gehouden met je laatst ingediende oplossing.
Log in om je oplossingen te testen.
Python sandbox
In dit venster kan je Python-code uitvoeren zonder iets te moeten installeren. De code die je hier schrijft wordt niet automatisch ingediend in Dodona.