SHARE
TWEET

Python Badges

marcosthomazs Jul 16th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Trainer:
  2.  
  3.     list_of_badges = ('rock', 'water', 'eletric', 'grass', 'poison', 'psych', 'fire', 'ground')
  4.    
  5.     def __init__(self):
  6.         self.badges = {b: False for b in self.list_of_badges}
  7.         # aqui pode ser 0 porque ele inicia todos com False, logo, vai ser 0 nesse ponto
  8.         self.numberOfBadges = 0  # self.verifyBadges()  
  9.        
  10.     def verifyBadges(self):
  11.         self.numberOfBadges = sum([self.badges[b] for b in self.list_of_badges])
  12.         return self.numberOfBadges
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