Tell us what’s happening:
Hello.
I made this code for the tasks; it outputs everything as it should (to my knowledge at least). Visually it looks correct and it also gives the correct error messages. Yet it doesn’t complete my checkmarks on the tasks, so I can’t proceed further. Am I missing something?
Your code so far
full_dot = '●'
empty_dot = '○'
def create_character(name, STR, INT, CHR):
if True != isinstance(name,str):
print("The Character name should be a string")
if len(name) > 11:
print("The Character name is too long")
if " " in name:
print("The Character name should not contain spaces")
if isinstance(STR,int)!=True or isinstance(INT,int)!=True or isinstance(CHR,int)!=True:
print("All stats should be integers")
if STR<1 or INT<1 or CHR<1:
print("All stats should be no less than 1")
if STR>4 or INT>4 or CHR>4:
print("All stats should be no more than 4")
if STR+INT+CHR != 7:
print("The Character should start with 7 points")
STR_total = 10 - STR
INT_total = 10 - INT
CHR_total = 10 - CHR
print (name)
print("STR " + full_dot*STR + empty_dot*STR_total)
print("INT " + full_dot*INT + empty_dot*INT_total)
print("CHR " + full_dot*CHR + empty_dot*CHR_total)
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/142.0.0.0 Safari/537.36
Challenge Information:
Build an RPG character - Build an RPG Character