Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Object-Oriented Python (retired) Inheritance Instance Methods

Error !!

I created an object called log and when I used log.hip_point it shows error. what might be the problem? (PS: I am using python 2.7)

class Character:


  def get_weapon(self):
    weapon=raw_input('weapon([S]word,[A]xe,[K]nife): ').lower()

    if weapon in 'sak':

      if weapon=='s':
        return 'sword'
      elif weapon=='a':
        return 'axe'
      else :
        return 'knife'

      return self.getweapon()

  def __init__(self,**kwargs):
    self.name=raw_input('Enter: ' )

    for k,v in kwargs.items():
Afrid Mondal
Afrid Mondal
6,255 Points

is it hip_point or hit_point???

1 Answer

andi mitre
andi mitre
Treehouse Guest Teacher

Hey Saro - for starters one error that you might be getting is a syntax error on line self.hp =. Can you possibly share all the other errors you are getting?