Tell us what’s happening:
Describe your issue in detail here.
even though i have completed the code, the program is not identifying any of the steps i have done, by this i mean, even at the end of the code, whe n i run it, it gives me a hint that i should have a function named create_character
Your code so far
full_dot = '●'
empty_dot = '○'
def create_character(name, strength, intelligence, charisma):
if not isinstance(name, str):
return "The character name should be a string"
elif not name:
return "The character should have a name"
elif len(name) > 10:
return "The character name is too long"
elif " " in name = True:
return "The character name should not contain spaces"
elif not isinstance((strength, intelligence, charisma),int):
return "ALl stats should be integers"
elif (strength or intelligence or charisma) < 1:
return "All stats should be no less than 1"
elif (strength or intelligence 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"
else:
return character_name
return "STR ", full_dot * strength, (10 - strength) * empty_dot
return "INT ", full_dot * intelligence, (10 - intelligence) * empty_dot
return "CHA ", full_dot * charisma, (10 - charisma) * empty_dot
create_character("ren", 4, 2, 1)
Your mobile information:
SM-X400 - Android 16 - Android SDK 36
Challenge: Build an RPG Character - Build an RPG Character
Link to the challenge: