Tell us what’s happening:
I have tried and got to the 10th task but unable to understand the meaning of it.
The current code output is the same as the Example Code but still unable to clear the 10th task.
Would appreciate some insight on what might be wrong.
Thank you in advance.
Your code so far
full_dot = '●'
empty_dot = '○'
def create_character(cName, cStr, cInt, cCha):
if not isinstance(cName, str):
return 'The character name should be a string'
if len(cName) > 10:
return 'The character name is too long'
if ' ' in cName:
return 'The character name should not contain spaces'
if not isinstance(cStr, int) or not isinstance(cInt, int) or not isinstance(cCha, int):
return 'All stats should be integers'
if cStr < 1 or cInt < 1 or cCha < 1:
return 'All stats should be no less than 1'
if cStr > 4 or cInt > 4 or cCha > 4:
return 'All stats should be no more than 4'
if (cStr+cInt+cCha) != 7:
return 'The character should start with 7 points'
return f"ren\nSTR {full_dot*cStr}{empty_dot*(10-cStr)}\nINT {full_dot*cInt}{empty_dot*(10-cInt)}\nCHA {full_dot*cCha}{empty_dot*(10-cCha)}"
print(create_character("Ren", 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/141.0.0.0 Safari/537.36
Challenge Information:
Build an RPG character - Build an RPG Character