Build an RPG Character - Build an RPG Character

Tell us what’s happening:

When create_character is called with a first argument that is a string it should not return The character name should be a string.

full_dot = ‘●’
empty_dot = ‘○’
def create_character(name, strenght, intelligence, charisma):
if not isinstance(name, str):
return ‘The character name should be a string’
elif 0 == len(name):
return ‘The caracter should have a name’
elif 10 < len(name):
return ‘The character namis too long’
elif ’ ’ in name:
return 'Th

Your code so far

full_dot = '●'
empty_dot = '○'
def create_character(name, strenght, intelligence, charisma):
    if not isinstance(name, str):
        return 'The character name should be a string'
    elif 0 == len(name):
        return 'The caracter should have a name'
    elif 10 < len(name):
        return 'The character namis too long'
    elif ' ' in name:
        return 'The character name should not contain spaces'
    if not isinstance(strenght, int) or not isinstance(intelligence, int) or not isinstance(charisma, int):
        return 'All stats should be integer'
    elif 1 > strenght or 1 > intelligence or 1 > charisma:
        return 'All stats should no less than 1'
    elif 4 < strenght or 4 < intelligence or 4 < charisma:
        return 'All stats should no more than 4'
    elif 7 < sum(strenght, intelligence, charisma):
        return 'The character should start with 7 points'
    

    Character_name = name
    Strenght = full_dot * strenght + empty_dot * (10 - strenght)
    intelligence = full_dot * intelligence + empty_dot * (10 - intelligence)
    charisma = full_dot * charisma + empty_dot * (10 - charisma)
    
    return f"{name}\nSTR: {str_dots}\nINT: {int_dots}\nCHA: {cha_dots}"
    
    


Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36

Challenge Information:

Build an RPG Character - Build an RPG Character

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-rpg-character/67d83df6f82eda3868dd2a84.md at main · freeCodeCamp/freeCodeCamp · GitHub

Welcome to the forum @rosimon,

Please make sure your return messages match exactly to the instructions.

I’m seeing this error message in the console:

Traceback (most recent call last):
  File "main.py", line 29, in <module>
  File "main.py", line 18, in create_character
TypeError: sum() takes at most 2 arguments (3 given)

Where are you defining str_dots, int_dots, and cha_dots?

Happy coding

Welcome to the forum @rosimon

Did you notice the error message in the console?

Happy coding