Build an RPG Character

full_dot = '●'

empty_dot = '○'

def create_character(name, strength, intelligence, charisma):

    if not isinstance(name, str):

        return 'The character name should be a string.'

    if name == '':

        return 'The character should have a name.'

    if len(name) > 10:

        return 'The character name is too long.'

    if ' ' in name:

        return 'The character name should not contain spaces.'

    stats = \[strength, intelligence, charisma\]

    for stat in stats:

        if not isinstance(stat, int):

        return 'All stats should be integers.'

    for stat in stats:

        if stat < 1:

            return 'All stats should be no less than 1.'

    for stat in stats:

        if stat > 4:

            return 'All stats should be no more than 4.'

    if sum(stats) != 7:

            return 'The character should start with 7 points.'

    def build_bar(value):

        return full_dot \* value + empty_dot \* (10 - value)

    result = (

    f'{name}\\n'

    f'STR {build_bar(strength)}\\n'

    f'INT {build_bar(intelligence)}\\n'

    f'CHA {build_bar(charisma)}'

    )

I don’t know what’s wrong with this code I didn’t pass test 1 to 12.

I’m coding on my phone

Can you be more specific about how your efforts to debug have gone and how you’re stuck?

We can’t fix your code for you, so we need you to say more so we can help you finish fixing your code.

I’ve edited your post to improve the readability of the code. When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add the backticks.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Welcome to the forum @momohyusuflove !

Is this code formatted correctly? Does that validation message match exactly to the message in the instructions? Also, where does create_character return a value if all the validation tests pass?

you are not doing anything with this result variable