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
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: hit_point=7 xp=5 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' else: return self.getweapon() def __init__(self,**kwargs): self.name=raw_input('Enter: ' ) self.weapons=self.get_weapon() self.hp= for k,v in kwargs.items(): setattr(self,k,v)
andi mitreTreehouse 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?