SHARE
TWEET

Untitled

a guest Oct 14th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Noveny(Eloleny):
  2.     def __init__(self, orszag='', csalad='', nev='', meret=0, ):
  3.         Eloleny.__init__(self, orszag, csalad, nev, meret)
  4.         self.__egyed = []
  5.  
  6.     def __ge__(self, other):
  7.         if (self.getOrszag() == other.getOrszag()):
  8.             if (self.getMeret() == other.getMeret()):
  9.                     return self.getNev()<self.getNev()
  10.             else:
  11.                 return int(self.getMeret()) > int(other.getMeret())
  12.         else:
  13.             if isinstance(other,Ragadozo):
  14.                 if (self.getMeret() == other.getMeret())*2:
  15.                     return self.getNev() < self.getNev()
  16.                 else:
  17.                     return int(self.getMeret()) >  int(other.getMeret())*2
  18.  
  19.             elif isinstance(other,Allat):
  20.                 if (self.getMeret() == other.getMeret())*10:
  21.                     return self.getNev() < self.getNev()
  22.                 else:
  23.                     return int(self.getMeret()) > int(other.getMeret())*10
  24.  
  25.     def __lt__(self, other):
  26.         if isinstance(other,Ragadozo):
  27.                 return int(self.getMeret()) > int(other.getMeret()) * 2
  28.  
  29.         elif isinstance(other, Allat):
  30.                 return int(self.getMeret()) > int(other.getMeret()) * 10
  31.         else:
  32.             return int(self.getMeret()) > int(other.getMeret())
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top