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! While you're at it, check out some resources Treehouse students have shared here.
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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
Mehran Moradi
11,140 PointsPlease help as I am stuck in Part 4
Could you help me solve the last part
from character import Character
class Warrior(Character):
weapon = "sword"
def rage(self):
self.attack_limit = 20
def __str__(self):
return "Warrior, <{}>, <{}>".format(self.weapon, self.attack_limit)
1 Answer
![Jennifer Nordell](https://uploads.teamtreehouse.com/production/profile-photos/5432702/micro_jen-square.jpg)
Jennifer Nordell
Treehouse TeacherHi Mehran! You are so close here so I'm going to just give some hints.
- You have indentation errors. The return statement for the string should be indented inside the str method.
- They don't actually want you to print out the angle brackets. Those are shown as part of a placeholder.
- The ending string returned should look something like "Warrior, axe, 13"
Hope this helps!
Mehran Moradi
11,140 PointsMehran Moradi
11,140 PointsThanks for your answer. It almost made me crazy