title: Unresolved reference in Python class
body: <p>This is my code:</p>
  
  <pre><code>class robot:
      def __init__(givenName,givenColor):
          self.name=givenName//error
          self.color=givenColor//error
      def intro(self):
          print("my name izz "+self.name)
  
  r1=robot();
  r1.name='tom'
  r1.color='red'
  
  r2=robot();
  r2.name='blue'
  r2.color='blue'
  r1.intro()
  r2.intro()
  </code></pre>
  
  <p>I am getting an error in the above commented lines. I know this question has many answers on stackoverflow but none seems to work . <a href="https://i.stack.imgur.com/BNc4i.png" rel="nofollow noreferrer"> the function calls self.color and self.color give the error.</a></p>