SHARE
TWEET

Untitled

a guest Oct 18th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Sang:
  2.  
  3.     def __init__(self,tittel, artist):
  4.         self._tittel = tittel
  5.         self._artist = artist
  6.    
  7.     def spill(self):
  8.         print("Spiller: " + self._tittel +  " " + self._artist)
  9.  
  10.     def sjekkArtist(self, navn):
  11.         n = navn.split()
  12.  
  13.         for sjekk in n:
  14.          
  15.             if(sjekk in self._artist):
  16.            
  17.                 return True
  18.         return False
  19.    
  20.     def sjekkTittel(self, tittel):
  21.         if(tittel.lower() == self._tittel.lower()):
  22.             return True
  23.         return False
  24.     def sjekkArtistogTittel(self, artist, tittel):
  25.         if(self.sjekkArtist(artist)and self.sjekkTittel(tittel)):
  26.             return True
  27.         return False
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