Tell us what’s happening:
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’
elif name.find(’ ') != -1:
return ‘The character name should not contain spaces’
if not (isinstance (strength, int) or isinstance (intelligence, int) or isinstance (charisma, int)):
return ‘All stats should be integers’
elif (strength < 1 or intelligence < 1 or charisma < 1):
return ‘All stats should be no less than 1’
elif (strength > 4 or intelligence > 4 or charisma > 4):
return ‘All stats should be no more than 4’
elif (strength+intelligence+charisma != 7):
return ‘The character should start with 7 points’
STR = (full_dot*strength)+empty_dot*(10-strength)
return f"{name}\n STR {STR} \n INT {STR} \n CHA {STR}"
print (create_character(‘ren’, 4, 2, 1))
It keeps spitting out an error for line 8 saying that it is outside of the function. I have tried everything I can think of so far to fix this by indenting, back spacing that indentation etc. How do I fix this?


