Python: Create RPG Character, Test 11

Hi,

When I run my code I get the below test failure:

image

also this:

Is the above check correct? Especially that “\n…” part?

\n is a newline. Anywhere you \n your program should start a new line. Note there is not a \n at the end after the last o

But shouldn’t the test read like this instead?
11. create_character('ren', 4, 2, 1) should return

ren

STR ●●●●○○○○○○

INT ●●○○○○○○○○

CHA ●○○○○○○○○○

The test gives a kind of raw string format so that it’s possible to see exactly where spaces and newlines are.

You can use repr() to see your output in the same format

print(repr(create_character('ren', 4, 2, 1)))

Use could use .replace() to achieve similar output.

Thanks I figured it out.

1 Like