Build an RPG Character - Build an RPG Character

Tell us what’s happening:

I’m not done writing the entirety of my code so I only want help finding the solution to my current roadblock. I can’t seem to get user stories 10, 12 , 14, and 16 to clear. I have no clue why as the code should function. If not, then I don’t know why. I noticed other people were using for loops as part of their solution but those are not a part of anything I’ve currently been shown I’m supposed to know. Am I? I don’t mind skipping ahead, it just seems wrong. Some clarity would be appreciated.

Your code so far

full_dot = '●'
empty_dot = '○'

def create_character(char_name, char_str, char_int, char_cha):

    if not isinstance(char_name, str):
        return 'The character name should be a string'
    if isinstance(char_name, str) and not char_name:
        return 'The character should have a name'
    elif ' ' in char_name:
        return 'The character name should not contain spaces'
    elif len(char_name) > 10:
        return 'The character name is too long'
    else:
        player_char_name = char_name
        return player_char_name

    if not isinstance(char_str, int) or not isinstance(char_int, int) or not isinstance(char_cha, int):
        return 'All stats should be integers'
    elif char_str < 1 or char_int < 1 or char_cha < 1:
        return 'All stats should be no less than 1'
    elif char_str > 4 or char_int > 4 or char_cha > 4:
        return 'All stats should be no more than 4.'
    elif sum(char_str, char_int, char_cha) != 7:
        return 'The character sohuld start with 7 pints.'


Your browser information:

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

Challenge Information:

Build an RPG Character - Build an RPG Character

Welcome to the forum @uli_g

To help you debug, add the following code after the function.

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

Happy coding