Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output Variable Display Issue in Error Message for Two Sum Problem #3769

Open
sharma-vasundhara opened this issue Dec 18, 2024 · 0 comments
Open

Comments

@sharma-vasundhara
Copy link

While running the Two Sum problem on the website using Python, I encountered an issue with the error message display. When the output is any other data type instead of a list, the error message fails to correctly display the actual output in one instance.

The relevant error message I received:

Traceback (most recent call last):
  File "/box/script.py", line 57, in main
    raise TypeError(f"Your output was {output}, but the expected return type is List[int]")
TypeError: Your output was (1, 0), but the expected return type is List[int]

Issue Details:

  • In the second last line of the traceback, {output} does not get replaced with the actual output value (1, 0). Instead, it remains as a placeholder {output}.
  • The final line, however, correctly displays the output (1, 0).

Expected Behavior:
The error message should consistently replace {output} with the actual value in both instances for clarity and consistency.

Language: Python
Problem: Two Sum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant