Build an RPG Character - Build an RPG Character

Tell us what’s happening:

I am unable to get the required output. Cant seem to find what is missing or what the mistake is. Can someone pls assist?

Your code so far

full_dot = '●'
empty_dot = '○'

def create_character(name, stats, intelligence, charisma):
    if not isinstance(name, str):
        return 'The character name should be a string'
    if not name:
        return 'The character should have a name'
    elif len(name) > 10:
        return 'The character name is too long'
    elif ' ' in name:
        return 'The character name should not contain spaces'

    if not isinstance(stats, int) or not isinstance(intelligence, int) or not isinstance(charisma, int):
        return 'All stats should be integers'
    if stats < 1 or intelligence < 1 or charisma < 1:
        return 'All stats should be no less than 1'
    elif stats > 4 or intelligence > 4 or charisma > 4:
        return 'All stats should be no more than 4'
    elif (stats + intelligence + charisma) != 7:
        return 'The character should start with 7 points'
    
    def makebar(value):
        return (value * full_dot) + ((7 - value) * empty_dot)
    
    return f"""{name}
STR {makebar(stats)}
INT {makebar(intelligence)}
CHA {makebar(charisma)}"""




create_character(3, 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/146.0.0.0 Safari/537.36 Edg/146.0.0.0

Challenge Information:

Build an RPG Character - Build an RPG Character

Welcome to the forum @stario !

Please review User Story #5. Are you meeting that requirement?

lines 2-4 should start with the stat abbreviation, STR , INT or CHA (in this order), then a space, and then a number of full dots ( ) equal to the value of the stat, and a number of empty dots ( ) to reach 10.

Happy coding!