Skip to content

Make it even clearer why Hello world isn't passing #34

Open

Description

@notionparallax

Do something like pairing off the chars so you can see where the delta is

Activity

  1. Anmol-Ghadia commented on Jun 28, 2023

    @Anmol-Ghadia

    I would like to close this issue, can you please elaborate a little about the specification? thank you.

  2. notionparallax commented on Jul 5, 2023

    @notionparallax
    ContributorAuthor

    Hi @Anmol-Ghadia !

    In set1, the students need to print hello world, they already have some leeway in what they write, but sometimes they write things that are hard to distinguish visually. E.g. "hello" and "hello " look the same when printed at the end of a line.

    The test for it is here:

    def test_hello_world(repo_path: str) -> bool:
    and it's already quite permissive, but it doesn't show exactly where the problem is and how to fix it.

    I'm not sure what the method to do that is yet, or if there are a range of situations that would be good to test it against, have a look at let me know what you think

  3. Anmol-Ghadia commented on Jul 18, 2023

    @Anmol-Ghadia

    What are your thoughts on a system that responds like so:

    1. User: "prinT('HelloWorld!')"
      Response:

      First mismatch on character 5,
      received: "prinT"
      expected: "print..."

    2. User: "print('Hello world!')"
      Response:

      First mismatch on character 14,
      received: "print('Hello "
      expected: "print('Hello w..."

    3. User: "print('Hello wor"
      Response:

      Partially correct code found.
      Expected: "print('Hello world!')"

    4. and so on

    It points out the first mistake that is found, (removing leading and trailing spaces).

  4. notionparallax commented on Jul 23, 2023

    @notionparallax
    ContributorAuthor

    That looks great. Especially if characters 0 in both strings are directly on top of each other.

    I wonder if we should follow the 3.11 error message convention of indicating where the problem is with a caret? (^)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

good first issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions