“Two Fer” Exercise Failing Despite Correct Output – Python Track

I’m Lisa Dyson. I’m using Exercism’s Python track to better understand coding, and I’ve run into a possible issue in the “Two Fer” exercise.
My solution:

def two_fer(name="you"):
    return f"One for {name}, one for me."

This works perfectly when tested locally and in online Python interpreters, but Exercism marks it as failing.

The expected and actual output seem identical:
“One for Alice, one for me.”

Is this a bug in the test validator, or am I missing something subtle like whitespace or formatting?

Thanks for any help.

Lisa Dyson

At a glance, the quotes here are incorrect. It’s hard to know if your code actually has double quotes or fancy quotes. With (tens/hundreds of) thousands of passing solutions, the tests are probably fine. It would help if you shared the complete code and complete test output using a codeblock.

@LisaDyson Putting links like the ones you did in your post make me think you’re either a legitimate user trying to build backlinks or an LLM generating spam posts. Please don’t do it in future posts :slight_smile: Thanks.

2 Likes