# Build an RPG Character - Build an RPG Character

**URL:** <https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/777208>\
**Category:** Curriculum Help\
**Tags:** python\
**Created:** [February 5, 2026, 6:52pm UTC](https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/777208 "2026-02-05T18:52:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![simofafa](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@simofafa](https://forum.freecodecamp.org/u/simofafa)\
**Post date:** [February 5, 2026, 6:52pm UTC](https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/777208/1 "2026-02-05T18:52:04Z")

</div>

### Tell us what’s happening:

i can’t pass 12 and 11 tests, the output is correcte, even when i change the 4,2,1 who has required it worked correctly

### Your code so far

```py
full_dot = '●'
empty_dot = '○'
def create_character(character_name,strength,intelligence,charisma):
    if not isinstance(character_name,str):
        return "The character name should be a string"
    if character_name == "":
        return "The character should have a name"
    if len(character_name) > 10:
        return "The character name is too long"
    if " " in character_name:
        return "The character name should not contain spaces"
    stats={"STR" : strength, "INT" : intelligence, "CHA" : charisma}
    for stat in stats.values():    
        if not isinstance(stat,int):    
            return "All stats should be integers"
    for stat in stats.values(): 
        if stat < 1:
            return "All stats should be no less than 1"
    for stat in stats.values():
        if stat > 4 :
            return "All stats should be no more than 4"
       
    the_sum = strength + intelligence + charisma
    if the_sum != 7:
            return "The character should start with 7 points"

    return f"""{character_name}
STR{full_dot * strength}{empty_dot*(10-strength)}
INT{full_dot * intelligence}{empty_dot*(10-intelligence)}
CHA{full_dot * charisma}{empty_dot*(10-charisma)}"""
         
print(create_character('ren', 4, 2, 1))

```

### Your browser information:

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36`

### Challenge Information:

Build an RPG Character - Build an RPG Character

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/python-v9/lab-rpg-character/build-an-rpg-character)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![dhess](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dhess/32/406235_2.png) [@dhess](https://forum.freecodecamp.org/u/dhess)\
**Post date:** [February 5, 2026, 6:57pm UTC](https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/777208/2 "2026-02-05T18:57:02Z")

</div>

```auto
print("Actual: ", repr((create_character('ren', 4, 2, 1))))
print("Expected: ", repr('ren\nSTR ●●●●○○○○○○\nINT ●●○○○○○○○○\nCHA ●○○○○○○○○○'))

```

Add this code to the bottom of your file so you can compare actual to expected.

---

<div class="post-metadata">

**Author:** ![simofafa](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@simofafa](https://forum.freecodecamp.org/u/simofafa)\
**Post date:** [February 5, 2026, 9:12pm UTC](https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/777208/3 "2026-02-05T21:12:41Z")

</div>

i did this code in the bottom but it still not working the tests 11 and 12

---

<div class="post-metadata">

**Author:** ![dhess](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dhess/32/406235_2.png) [@dhess](https://forum.freecodecamp.org/u/dhess)\
**Post date:** [February 5, 2026, 9:15pm UTC](https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/777208/4 "2026-02-05T21:15:16Z")

</div>

Please show what you see in the console.

---

<div class="post-metadata">

**Author:** ![simofafa](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@simofafa](https://forum.freecodecamp.org/u/simofafa)\
**Post date:** [February 5, 2026, 9:42pm UTC](https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/777208/5 "2026-02-05T21:42:04Z")

</div>

![photo_2026-02-05_22-40-59](https://global.discourse-cdn.com/freecodecamp/original/4X/1/2/e/12ef2ae1d9ca3659d015083f40b9934a07c0f34b.jpeg) here’s the output

---

<div class="post-metadata">

**Author:** ![dhess](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dhess/32/406235_2.png) [@dhess](https://forum.freecodecamp.org/u/dhess)\
**Post date:** [February 5, 2026, 9:45pm UTC](https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/777208/6 "2026-02-05T21:45:17Z")

</div>

Okay, good. Now you can check the difference between the two strings and fix yours to match what’s expected, right? It looks like a spacing issue.

---

<div class="post-metadata">

**Author:** ![simofafa](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@simofafa](https://forum.freecodecamp.org/u/simofafa)\
**Post date:** [February 6, 2026, 1:36pm UTC](https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/777208/7 "2026-02-06T13:36:14Z")

</div>

very thankfull it worked

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [March 6, 2026, 1:37pm UTC](https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/777208/8 "2026-03-06T13:37:10Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
