Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. import random
  2.  
  3. greetings = ["'How can I help you?'", "'...'", "'Next!'"]
  4. MOODS = ('bad', 'average', 'good')
  5. RANKS = ('low', 'medium', 'high')
  6.  
  7.  
  8. class Bureaucrat:
  9.     '''A government employee who works in the Institution.'''
  10.  
  11.     def __init__(self):
  12.         self.rank = random.choice(RANKS)
  13.         self.mood = random.choice(MOODS)
  14.  
  15.     def greet(self):
  16.         '''A random greeting from the government employee.'''
  17.  
  18.         print(random.choice(greetings))
  19.         print('The bureaucrat is of a {} rank.'.format(bureaucrat.rank))
  20.         print('The bureaucrat's mood seems to be {}.'.format(bureaucrat.mood))
  21.  
  22. bureaucrat = Bureaucrat()
  23. bureaucrat.greet()