Build an RPG Character - Build an RPG Character 18&19 HELP

Tell us what’s happening:

Hi guys, I just can’t get through problems 18 & 19 need help :frowning:

Your code so far

full_dot = '●'
empty_dot = '○'

    # CREATE THE FUNCITON BRO

    def create_character(name, strength, intelligence, charisma):
        
        # check character name and stats

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

        stats = [strength, intelligence, charisma]

        for s in stats:
            prev = 0
            if not isinstance(s, int):
                return 'All stats should be integers'
            if s < 1:
                return 'All stats should be no less than 1'
            if s > 4:
                return 'All stats should be no more than 4'
        sumstats = strength + intelligence + charisma
        if sumstats != 7:
            return 'The character should start with 7 points'

        def bars(stat):
            return full_dot * stat + empty_dot * (10 - stat)

        print(f"{name}\nSTR {bars(strength)}\nINT {bars(intelligence)}\nCHA {bars(charisma)}")
    create_character('ren', 4, 2, 1)

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 Edg/151.0.0.0

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 @mrbrekss,

I’m seeing this error in the console:

Traceback (most recent call last):
  File "main.py", line 6
    def create_character(name, strength, intelligence, charisma):
IndentationError: unexpected indent

If all values pass the verification, the function should return a string with four lines:

Should your function print the string or return it?

If you want to see what your function returns in the console, wrap your function call in print.

Happy coding

THANK YOU!! I finished it after a week :smiling_face_with_tear: