title: python: 'rand' is not defined, using random in a class
body: <p>I'm having trouble using the random module, because I'm using the randint in a class, it doesn't seem to be able to access the random module. How should this be approached?</p>
  
  <pre><code>from random import random
  
  class Pursuer():
      X_tally = 0
      Y_tally = 0
  
      def __init__(self):     
  
  
      def roll_pursue_type(self):
          self.pursue_dice = rand.randint(1,100)
          print(self.pursue_dice)
  </code></pre>
  
  <p>Traceback: line 12, in roll_pursue_type
      self.pursue_dice = rand.randint(1,100)
  NameError: name 'rand' is not defined</p>