Cant build an rpg cant post either

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 len(name)>=10:

    return "The character name is too long"

if ' ' in name:

    return "The character name should not contain spaces"

    stats = {'ST': 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:

                    'All stats should be no less than 1'

                    for stat in stats.values():

                        if stat > 4:

                            'All stats should be no more than 4'

                            if sum(stats.values()) != 7:

                                return 'The character should start with 7 points'

                                character_string = name

                                for key, stat in stats.items():

                                    return character_string



                                    print(create_character('ren', 2, 4, 1))

What tests are you failing? What have you tried to debug your code?

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Get Help > Ask for Help button located on the challenge.

The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

new and improved version: 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 len(name) > 10:

return 'The character name is too long'

if name in ‘’:

return 'The character name should have a name'

if name in ‘’:

return 'The character name should not contain spaces'

if not isinstance(strength, int) or not isinstance(intelligence, int) or not isinstance(charisma, int):

return 'All stats should be integers'

if strength < 1 or intelligence < 1 or charisma < 1:

return 'All stats should be no less than 1'

if strength > 4 or intelligence > 4 or charisma > 4:

return 'All stats should be no more than 4'

if strength + intelligence + charisma != 7:

return 'The character should start with 7 points'

return 'ren\nSTR ’ + full_dot*strength+empty_dot*(10-strength) + ‘nINT’ + full_dot*intelligence+empty_dot*(10-intelligence) + ‘nCHA’ + full_dot*charisma+empty_dot*(10-charisma)

RPG = create_character(‘ren’, 2, 4, 1)

print(RPG) i cant passobjectives 3 6 11 and 12

Please post again your code following this guide 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 (').

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!